How to write :hover
and :visited
condition for a:before
?
I\'m trying a:before:hover
but it\'s not working
BoltClock's answer is correct. The only thing I want to append is that if you want to only select the pseudo element, put in a span.
For example:
- List Element
instead of:
- data-icon='u' List Element
This way you can simply say
ul [data-icon]:hover::before {color: #f7f7f7;}
which will only highlight the pseudo element, not the entire li element