我遇到了 this free example website design template顶部有一些链接。根据 CSS,悬停时,链接文本及其背景应该改变颜色。它适用于 Firefox、Opera 和 IE,但在 Chrome 17.0.963.79 和 Safari 5.1.2 中悬停时没有变化,所以我怀疑是 webkit 问题。但是 CSS 看起来很无害。哪里出了问题?此悬停的 CSS 部分如下:
.topNaviagationLink a:hover
{
text-align:center;
border-bottom:none;
color:#0C61C9;
display: block;
width:121px;
height: 35px;
line-height: 35px;
background-image:url(tab.png);
}
最佳答案
这很有趣......
这行得通吗?
.topNaviagationLink:hover a
{
text-align:center;
border-bottom:none;
color:#0C61C9;
display: block;
width:121px;
height: 35px;
line-height: 35px;
background-image:url(tab.png);
}
关于html - CSS:链接悬停在 Chrome 和 Safari 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9691416/