我有一个滚动顶部菜单。我正在尝试获取它,以便我的背景图像 (17px x 13px) 悬停在中央。我已经尝试了所有背景 css 属性,但似乎没有任何效果。我是不是用错了方法?
这是我的 CSS:
#navlist a:hover
{
color: #fff;
background-color: #b2b85c;
text-decoration: none;
background-image: url(Images/pointer.jpg);
background-position: center bottom;
background-attachment: fixed;
}
这是页面的链接。
最佳答案
我假设您指的是顶部菜单导航。
尝试将 background-repeat: no-repeat;
添加到 #navlist a:hover
关于CSS 翻转 - 背景图像不会居中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6801797/