asp.net - div with background fixed -
i trying add div html box image in it. couldnt make image stretch div's size
here have far,
<div style="background:url('images/box.png') no-repeat center center fixed;width:600px;height:400px">     test  </div> this displays div width 600px , height 400px displays half of image. need make image stretch.
thanks
if want image stretch, losing it's original aspect ratio, add background-size: 100% 100%;. 
on other hand, if want image take entire div while maintaining image aspect ratio , clipping okay, use  background-size: cover
Comments
Post a Comment