给出以下html代码:
<a href="#"><span data-icon="✪"></span>A Link</a>
在悬停时改变text-decoration
(为none)是否可能?color
会改变,text-decoration
不会。
CSS:
a { text-decoration: none; }
a:hover{ text-decoration: underline; }
a:hover [data-icon]:before{
/*Doesn't work*/
text-decoration: none;
/*Works*/
color: red;
}