CSS 翻转 - 背景图像不会居中

标签 css rollover background-position

我有一个滚动顶部菜单。我正在尝试获取它,以便我的背景图像 (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;
}

这是页面的链接。

http://kerrydean.ca/Grey%20River/greyRiverTemplate2.html

最佳答案

我假设您指的是顶部菜单导航。

尝试将 background-repeat: no-repeat; 添加到 #navlist a:hover

的 CSS 规则中

关于CSS 翻转 - 背景图像不会居中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6801797/

相关文章:

javascript - 如何仅使用 jquery 一次在导航中添加 nav-active 类

css - 以 Bootstrap 形式输入更大的文本

html - 当我在我的网站上从一个页面跳到下一个页面时,它会在 Chrome 中公开 HTML

elasticsearch - 获取ES中的所有翻转索引

javascript - html/javascript - 去饱和/灰度图像翻转而不创建图像副本或 Sprite

javascript - jQuery 获取文本阴影变量(多个阴影)

image - Aurelia 翻转图像显示/隐藏

html - CSS3 背景大小和背景位置问题

css - 将百分比值与线性渐变的背景位置一起使用

jquery - 清除 setInterval 问题