我有一些超链接,链接前面有内容,就像图片中的样子。
这是我正在使用的代码。
a {
font-size: 14px;
text-decoration: none;
color: $grey;
font-weight: bold;
text-decoration: underline;
&:hover {
cursor: pointer;
}
&:before {
content: '\1F847';
color: $green;
padding-right: 8px;
text-decoration: none;
}
&:after {
text-decoration: none;
}
}
我需要保留箭头作为内容,但不希望它有下划线的文本装饰。如您所见,我尝试在之前和之后添加text-underline:none
,但并没有起作用。如果需要,我可以使用 JS/Query,但仍然不知道如何解决这个问题。