Php 如何使图像显示为完整的图像背景
下面的代码将图像多次显示为10个不同的图像,需要完整图像Php 如何使图像显示为完整的图像背景,php,html,css,Php,Html,Css,下面的代码将图像多次显示为10个不同的图像,需要完整图像 <HTML> <BODY > <style> body {background-image:url('back1.jpg');} </style> </BODY> </HTML> 正文{背景图像:url('back1.jpg');} body{background image:url('back1.jpg');background repeat:no re
<HTML>
<BODY >
<style>
body {background-image:url('back1.jpg');}
</style>
</BODY>
</HTML>
正文{背景图像:url('back1.jpg');}
body{background image:url('back1.jpg');background repeat:no repeat;}//添加no repeat
试试这个
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;
}
像这样的事情一直对我有用
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>
正文{
背景:url(cool image.jpg)无重复中心;
排名:0;
左:0;
最小宽度:100%;
最小高度:100%;
-webkit背景尺寸:封面;
-moz背景尺寸:封面;
-o-背景尺寸:封面;
背景尺寸:封面;
}
它出现在左上角,需要它是满的吗
background-repeat: no-repeat;
background-size: cover;
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>