0

我正在尝试使用带有背景图像的几个图像链接进行导航。如果我让链接 div 调用图像,它们就会出现。但是当我将链接调用到同一个类时,背景图像就会消失。任何帮助表示赞赏

CSS

#advertising  {
    z-index: 1;
    width: 465px;
    height: 65px;
    display: block;
    position: absolute;
    background: url('../images/advertising.png');
}

HTML

<a href="#" id="advertising"></a>
4

2 回答 2

0

在我的一个项目中,我遇到了类似的问题。如果我将我的 css 称为“css/medium.css”,它就不起作用。我不得不在开头的“/css/medium.css”中用斜杠调用它

于 2013-04-22T19:17:06.140 回答
0

1)你可能应该给它一个top, left... 位置的值。

2)尝试图像的绝对路径。

3)尝试将元素容器之一的位置设置为相对。

4)禁用广告过滤器:)

于 2013-04-22T19:01:22.627 回答