Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/reporting-services/3.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/26.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
图像在CSS中不垂直重复_Css - Fatal编程技术网

图像在CSS中不垂直重复

图像在CSS中不垂直重复,css,Css,顶部背景图像在IE7中没有重复或显示全高。 它适用于Firefox和Chrome 顶级家庭: .home-top{ background: url('../images/top-home-bg.gif'); float:left; width:100%; text-align:center; height:180px; } 在主页顶部中,在顶部的第二个分隔符后面没有显示backgorund图像 您需要设置图像的“位置”和“重复”值: background-image:url

顶部背景图像在IE7中没有重复或显示全高。 它适用于Firefox和Chrome

顶级家庭:

.home-top{
  background: url('../images/top-home-bg.gif');
  float:left;
  width:100%;
  text-align:center;
  height:180px;
}
主页顶部
中,在顶部的第二个分隔符后面没有显示backgorund图像


您需要设置图像的“位置”和“重复”值:

background-image:url(...);
background-position: 0 0;
background-repeat: repeat-x;

如果愿意,您也可以在单个“后台”声明中设置此项。

将有效的doctype添加为HTML的第一行:

<!DOCTYPE html>


如果没有这一点,您的页面将呈现在中,这是各种各样的,特别是在IE中。

可能是因为该类有一个静态高度

图像大小是多少

改变它,试试看

background-repeat: repeat-x;

你是说框架中的花吗?再详细一点和一些代码,特别是显示与背景图像相关的CSS,在这里会很有用。..home-top{background:url('../images/top-home-bg.gif');float:left;width:100%;text-align:center;height:180px;}在home top类中,在顶部的第二个分隔符后面没有显示backgorund图像。它在IE7中不起作用,也就是说它在IE中不起作用是不够的;什么版本的IE不起作用?@AshutoshMishra请不要在问题中添加细节作为评论。请编辑带有其他详细信息的问题。抱歉,这没有帮助。我认为@thirtydot的答案一定是正确的-它是在怪癖模式下渲染的。非常感谢。现在开始工作了