Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/69.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 如何使图像显示为完整的图像背景_Php_Html_Css - Fatal编程技术网

Php 如何使图像显示为完整的图像背景

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

下面的代码将图像多次显示为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 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>