HTML   发布时间:2022-04-14  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了html – 如何在悬停时停止链接更改颜色?大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我的页面上有一个电子邮件链接,当它悬停时会变成蓝色. @H_675_2@我似乎无法解决这个问题,我根本不希望它改变.在它的CSS我有它:

.emaillink2
{   text-decoration: none;
color: white;}

a.hover:hover
{   text-decoration: none;
color: white;}

#headerinfo
{
float: right;
font-size: 32px;
color: white;
z-index: 1;
text-align: right;
margin-top: 20px;
text-decoration: none;
}
@H_675_2@div的HTML:

<div id="headerinfo">
Telephone: 07777777777
<br/>
Fax: 07777777777
<br/>
Email: <a href="mailto:info@website.org" class="emaillink2">Info@website.org</a>
</div>
@H_675_2@然而,当它盘旋时它仍会改变颜色.

解决方法

更改此代码:
.emaillink2
{   text-decoration: none;
color: white;}
@H_675_2@这段代码:

.emaillink2,.emaillink2:hover
{   text-decoration: none;
color: white;}

大佬总结

以上是大佬教程为你收集整理的html – 如何在悬停时停止链接更改颜色?全部内容,希望文章能够帮你解决html – 如何在悬停时停止链接更改颜色?所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。