在我网站的页脚(开发中)http://www.stefaanoyen.be , 文本前有 3 个带有箭头的按钮。箭头是一种图标字体,我希望它在悬停按钮时改变颜色(就像按钮文本一样)。
知道怎么做吗?
这是我的 html:
<a class="footerbutton"><span class="footerlist">X</span>Vraag offerte</a>
这是按钮:悬停 css:
a:hover.footerbutton {
background-color: #B61618;
color: #ddd;
border: none;
text-decoration: none;
}
这是页脚列表跨度类 css:
.footerlist:hover {
color: #ddd;
}
最佳答案
在悬停时定位按钮内图标颜色的最简单方法是像这样定位它:
.footerButton:hover .footerlist {
color: #ddd;
}
关于css - 悬停时更改按钮内的字体图标颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15624730/