CSS3 转换未按预期应用于所有 <a> 元素

标签 css hyperlink hover anchor transition

在我的标题中,我指定了这个 CSS。

a:link {
    -moz-transition: all 0.2s ease-in-out;
    -o-transition: all 0.2s ease-in-out;
    -webkit-transition: all 0.2s ease-in-out;
    transition: all 0.2s ease-in-out;
    color:#3462D6;
}

a:visited {
    -moz-transition: all 0.2s ease-in-out;
    -o-transition: all 0.2s ease-in-out;
    -webkit-transition: all 0.2s ease-in-out;
    transition: all 0.2s ease-in-out;
    color:#3462D6;
}

a:hover {
    -moz-transition: all 0.2s ease-in-out;
    -o-transition: all 0.2s ease-in-out;
    -webkit-transition: all 0.2s ease-in-out;
    transition: all 0.2s ease-in-out;
    color:#82D1F7;
}

a:active {
    -moz-transition: all 0.2s ease-in-out;
    -o-transition: all 0.2s ease-in-out;
    -webkit-transition: all 0.2s ease-in-out;
    transition: all 0.2s ease-in-out;
    color:#3462D6;  
}

a {
    text-decoration: none;
}

对于大多数链接,过渡都有效,但是我访问过的链接不会在 Chrome 中播放动画(而且我假设其他 webkit 浏览器也是如此)但是在 Firefox 中,所有链接都可以很好地播放过渡动画.

链接在 Chrome 中不转换的原因可能是什么? 网址是http://www.fuyuri.com

最佳答案

将事件状态移动到悬停状态之上。 - 链接、访问、事件、悬停、焦点,您需要将转换应用于所有状态。转换不是继承的。

关于CSS3 转换未按预期应用于所有 <a> 元素,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8598772/

相关文章:

ruby-on-rails - Rails - 将样式/图像添加到 button_to

css - 将 LESS 输出拆分为两个文件 - 变量和常量

list - 在 Sharepoint 联系人列表中制作可点击的电话超链接

java - 如何通过将鼠标悬停在变量上来显示变量值

css - 带有边框半径和 overflow hidden 的变换转换在 Safari 中不起作用

jQuery 变换旋转未按预期运行

html - anchor 标记内的文本未显示

css - 如何使菜单链接在文本旁边有图像?

javascript - 单击 A 链接并打开多个转到不同 URL 的新窗口?

javascript - 悬停时更改链接图像