【发布时间】:2017-09-21 07:00:28
【问题描述】:
我的背景没有加载。它嵌入在通过样式表加载的标题标签中。请参阅下面的 css:
header{
margin: 0;
background-image: url(/images/sagage_header900.png) no-repeat ;
display: block;
}
提前谢谢!
【问题讨论】:
-
url路径是否正确?你检查了吗?
我的背景没有加载。它嵌入在通过样式表加载的标题标签中。请参阅下面的 css:
header{
margin: 0;
background-image: url(/images/sagage_header900.png) no-repeat ;
display: block;
}
提前谢谢!
【问题讨论】:
不要在background-image 属性中使用no-repeat。
试试这个:
background: url(/images/sagage_header900.png) no-repeat;
或
background-image: url(/images/sagage_header900.png);
background-repeat: no-repeat;
【讨论】:
尝试删除 no-repeat
background-image: url(/images/sagage_header900.png);
如果你想添加后台重复:
background-repeat: no-repeat
如果仍然不起作用,请尝试将!important 添加到背景图像,如下所示:
background-image: url(/images/sagage_header900.png)!important;
【讨论】: