如何仅对“之前的内容”(“\ f00d”)进行悬停效果?

时间:2018-06-17 09:00:53

标签: html css

我希望我的悬停效果仅在我将其悬停到之前的内容时激活。

enter image description here

enter image description here

1 个答案:

答案 0 :(得分:1)

使用fryd-viewer-wrapper:hover:before



a:before {
   font-family: 'Font Awesome 5 Free';
   content: "\f008";
   font-weight: 900;
}
a:hover:before {
color:red;
}

<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp" crossorigin="anonymous">


<a>Try me</a>
&#13;
&#13;
&#13;