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

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -