下面的代码多次显示图像到10个不同的图像,需要它是完整的图像..
<HTML>
<BODY >
<style>
body {background-image:url('back1.jpg');}
</style>
</BODY>
</HTML>
答案 0 :(得分:3)
这样的事总是对我有用。
body {
background: url(cool-image.jpg) no-repeat center center;
top:0;
left:0;
min-width:100%;
min-height:100%;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
</style>
答案 1 :(得分:2)
试试这个......
html {
background: url(images/bg.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
答案 2 :(得分:1)
<HTML>
<BODY >
<style>
body {background-image:url('back1.jpg');background-repeat:no-repeat;} // add the no repeat
</style>
</BODY>
</HTML>
答案 3 :(得分:0)
background-repeat: no-repeat;
background-size: cover;