gpt4 book ai didi

javascript - 淡入淡出链接悬停不起作用

转载 作者:太空宇宙 更新时间:2023-11-04 12:11:05 25 4
gpt4 key购买 nike

我使用以下方法创建淡入淡出的链接悬停:

 a:link {color:#333333; text-decoration: none;
-o-transition:.5s;
-ms-transition:.5s;
-moz-transition:.5s;
-webkit-transition:.5s;
transition:.5s;}
a:visited {color:#FF0033; text-decoration: none;}
a:hover {color:#000000; text-decoration: none;}
a:active {color:#FF0033; text-decoration: none;}
a:focus {outline-style: none;}

我使用 Wordpress,我的网站对不同的链接使用不同的颜色(例如,颜色 A 的菜单、颜色 B 的类别链接、颜色 C 的标题等)

由于某些奇怪的原因,淡入淡出悬停对于类别链接(例如灰色框中的“Conciertos”)工作得很好,但对于其余链接则不能正常工作。它会进行某种缓慢的悬停。请查看 flamencosrosas.com 了解我的意思。请问有人可以帮忙吗?

非常感谢!

最佳答案

您应该指定要转换的内容,因此:

 a {color:#FF0033; text-decoration: none;
-o-transition: color .5s;
-ms-transition: color .5s;
-moz-transition: color .5s;
-webkit-transition: color .5s;
transition: color s;}
a:visited {color:#FF0033; }
a:hover {color:#000000; }
a:active {color:#FF0033; }
a:focus {outline-style: none;}

Fiddle here ,我将过渡设为 1s,以便它们更加引人注目。

此外,您的意思是链接默认为#333333 吗? #333333 和 #000000 之间的过渡非常轻微,您可能根本没有注意到过渡的发生。

关于javascript - 淡入淡出链接悬停不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29042772/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com