html - IMG for devices -
does have code how website can load size of picture automatically device?
picture size: width: 1920 height: 900px
my code:
<div class="item active"> <img src="img_20170603_161151.jpg" class="img- responsive" alt="ozean" style="width: 100%; height: 900px;" > <div class="carousel-caption"> </div> </div>
img files loaded directly dom. therefor cannot change image while loading. there 2 options:
- adding correct src javascript based on screen width.
- don't use background image set correct media query in css.
Comments
Post a Comment