我想使一个图像成为网站的完整背景!我知道这听起来很简单,但它只是让我疯狂,它不适合的页面,这是我达到的最后一次尝试!
CSS:
body {
background:url('images/bg_img1.jpg') #A98436 no-repeat left top;
-webkit-background-size: cover;
-moz-background-size: cover;
background-size: cover;
}
我也使用Twitter Bootstrap,但事情甚至没有,我不能正确的!
任何帮助将不胜感激.
编辑:我没有使用精确的像素,因为我正在尝试做出敏感的移动设计.
我不知道为什么他们下了这个问题!但这是我如何解决它!
html,body {
margin: 0;
padding: 0;
height: 100%;
}
#mybody {
background: url('images/bodybg.jpg') no-repeat center left;
background-size: 100% 100%;
width: 100%;
height: 100%;
height: auto !important;
min-height:100%;
}
#myheader {
background: url('images/headerbg.jpg') no-repeat center left;
background-size: 100% 100%;
width: 100%;
height: 100%;
height: auto !important;
min-height:100%;
}
#myfooter {
background: url('images/footerbg.jpg') no-repeat center left;
background-size: 100% 100%;
width: 100%;
height: 100%;
height: auto !important;
min-height:100%;
}