javascript - semi responsive image depends on width -
i have div 's 600px wide , have image inside of it. want image have maximum width of 600px don't want image 100% make responsive.
a better example if have image width less 600px don't make responsive if it's greater 600 make responsive.
<div style="max-width: 600px; width: 100%"> <img src="some-image.jpg" alt=""> </div>
for image use width:100% , height:auto , container use max-width:600px; makes image resopnsive.
Comments
Post a Comment