我的页面上有一个电子邮件链接,当它悬停时会变成蓝色.
我似乎无法解决这个问题,我根本不希望它改变.在它的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;}