我在 Mac 上的 Chrome 的 href 中使用绝对链接的 CSS 过渡属性时遇到了一些问题。
我有
a {
-webkit-transition: all 0.3s ease-in-out;
-moz-transition: all 0.3s ease-in-out;
-ms-transition: all 0.3s ease-in-out;
-o-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;
}
a { color: #333;
a:hover { color: #c3dd11; }
和
<a href="/home/">Link fades</a>
<a href="#">Link fades</a>
<div id="header">
<nav>
<a href="http://danielcgold.com">Link doesn't fades</a>
</nav>
</div>
这是一个 JS fiddle :http://jsfiddle.net/bYBxC/
知道为什么这不起作用吗?
最佳答案
我也一样。我无法弄清楚所有非工作链接的共同点是什么。读到你的问题我想“啊哈!”但我刚刚检查过,一些绝对 url 显示过渡效果很好。不过,我注意到的是,不 开头有 www.
的绝对 url 不显示过渡,但有的绝对 url 会显示。我注意到在您的示例中,域名前面没有 www.
。尝试添加它,看看它是否有效。这似乎是一个 Chrome 错误。
编辑
刚刚摆弄了 fiddle ,两个链接都显示了过渡,而不管 url 是什么。起初情况并非如此。确实是非常奇怪的错误。
关于html - CSS3 : link doesn't transition with absolute path as href in Chrome on Mac ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8613313/