Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/81.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
Html Css-后台img url无重复中心中心不工作_Html_Css - Fatal编程技术网

Html Css-后台img url无重复中心中心不工作

Html Css-后台img url无重复中心中心不工作,html,css,Html,Css,我在我的网站上使用bootstrap,但我只有一个问题 -HTML } 我无论如何都试过了,但封面或中心在我的网站上不起作用 如何解决这个问题?现在我没有任何解决办法 首先,第二个div的语法不正确。具体来说,你把class拼写错了。通常,堆栈溢出对这些类型的问题并不友好,因此请确保您发布的代码与问题中的代码几乎完全相同(减去原始数据)。对于初学者,您的第二个div语法不正确。具体来说,你把class拼写错了。通常,堆栈溢出不会善待这些类型的问题,因此请确保您发布的代码与问题中的代码几乎完全相同

我在我的网站上使用bootstrap,但我只有一个问题

-HTML

}

我无论如何都试过了,但封面或中心在我的网站上不起作用


如何解决这个问题?现在我没有任何解决办法

首先,第二个div的语法不正确。具体来说,你把class拼写错了。通常,堆栈溢出对这些类型的问题并不友好,因此请确保您发布的代码与问题中的代码几乎完全相同(减去原始数据)。

对于初学者,您的第二个div语法不正确。具体来说,你把class拼写错了。通常,堆栈溢出不会善待这些类型的问题,因此请确保您发布的代码与问题中的代码几乎完全相同(减去原始数据)

 <div class="first-background">
        ----- skip 
 </div>

 <div class="second-background">
        ----- skip
 </div>
.first-background{
  padding-top: 100px;
  width: 100%;
  background-color: #E8ECEE;    
}

.second-background{
  background-image: url(../img/background.png);

  -- first ways
  background-repeat:no-repeat;
  background-size: cover;

  -- second ways
  background-repeat: no-repeat;
  background-position: center center;

  -- third ways 
  background-image: url(../img/background.png) no-repeat center center fixed;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  background-size: cover;
  -o-background-size: cover;