背景图片不显示

时间:2019-07-16 13:04:53

标签: css

我想要身体上的背景,但是我无法使它正常工作...

我已经尝试过更改路径,我已经对其进行了多次检查,并且作为图像可以正常工作。

 /**Body**/
 body {
     background: url(background: url(img/fond.jpg) repeat;
 }

 .header {
     background: #404040;
     height: 35px;
     width: 100%;
 }

 /**Wrap**/
 .wrap {
     width: 960px;
     margin: 0 auto;
 }

 /**Contenu**/
 .contenu-haut {
     background: url(img/contenuhaut.jpg)no-repeat;
     width: 1200px;
     height: 41px;
 }

 .blog {
     background: url(img/contenuhaut.jpg) repeat-x;
     width: 1200px;

 }

3 个答案:

答案 0 :(得分:4)

应该是这样的:

body {
  background: url(img/fond.jpg) repeat;
}

答案 1 :(得分:0)

body{
  background-image: url("img_girl.jpg");

  /* Full height */
  height: 100%; 

  /* Center and scale the image nicely */
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

答案 2 :(得分:-2)

尝试此代码

<!DOCTYPE html>
<html>
<head>
<style>
body  {
  background-image: url("Desktop\1.JPG");
  background-color: #cccccc;
}
</style>
</head>
<body>

<h1>The background-image Property</h1>

<p>Hello World!</p>

</body>
</html>

相关问题