html – 如何在悬停时停止链接更改颜色?
发布时间:2020-12-14 18:29:39 所属栏目:资源 来源:网络整理
导读:我的页面上有一个电子邮件链接,当它悬停时会变成蓝色. 我似乎无法解决这个问题,我根本不希望它改变.在它的CSS我有它: .emaillink2{ text-decoration: none;color: white;}a.hover:hover{ text-decoration: none;color: white;}#headerinfo{float: right;fon
我的页面上有一个电子邮件链接,当它悬停时会变成蓝色.
我似乎无法解决这个问题,我根本不希望它改变.在它的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; } 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> 然而,当它盘旋时它仍会改变颜色. 解决方法
更改此代码:
.emaillink2 { text-decoration: none; color: white;} 这段代码: .emaillink2,.emaillink2:hover { text-decoration: none; color: white;} (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |