我怎样才能达到这种效果?
最佳答案
对于完整的水平和垂直尝试类似的东西:
background-image: url(image.jpg);
background-repeat:no-repeat;
background-position:center center;
background-attachment:fixed;
-o-background-size: 100% 100%, auto;
-moz-background-size: 100% 100%, auto;
-webkit-background-size: 100% 100%, auto;
background-size: 100% 100%, auto;
或者更好地在 http://jsfiddle.net/ 中发布您的代码
关于HTML/CSS : IMG with height equal to the height of document (not the window),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4664314/