将鼠标悬停在链接上时,CSS 光标属性无法正常工作

标签 css html sass

我正在使用以下代码更改我网站的光标 (SASS):

body {
  cursor: url(../images/cursor.png), auto;
  a {
    color: grey;
    text-decoration: none;
    &:hover {
      cursor: url(../images/cursor.png), pointer;
      color: black;
    }
  }
}

我使用 Chrome 作为我的浏览器,出于某种原因,无论我尝试什么,当我将鼠标悬停在 <a> 上时,我总是看到这种抖动发生。标签:

An example of the jitter

我怀疑是 Chrome 的默认光标导致的,但我不太明白。 有没有办法解决这种抖动?

最佳答案

光标移到:hover伪选择器之外

关于将鼠标悬停在链接上时,CSS 光标属性无法正常工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49905133/

相关文章:

javascript - angular如何定义css

html - 将缩略图宽度与其父图像对齐

css - 音频问题 html5

css - Angular/SCSS : animation not applied on element

html - bootstrap 4 按钮文本对齐

html - 仅使用 css 隐藏第二个下拉框 - 不起作用

eclipse - 重启 TomCat 时使用 sass-maven-plugin 编译 *.scss 文件

html - 如何将多个蒙版剪辑到一个固定背景?

c# cassette - 如何为不同的页面创建不同的 css 包

html - anchor 标签不填充高度和宽度