下面的代码将图像多次显示为 10 个不同的图像,需要它是完整的图像..
<HTML>
<BODY >
<style>
body {background-image:url('back1.jpg');}
</style>
</BODY>
</HTML>
像这样的东西一直对我有用。
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>
试试这个...
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;
}
<HTML>
<BODY >
<style>
body {background-image:url('back1.jpg');background-repeat:no-repeat;} // add the no repeat
</style>
</BODY>
</HTML>
background-repeat: no-repeat;
background-size: cover;