There is such a style:
a { background:black; } a:before { background:red; } a:hover a:before { background:white } For some reason, a hover style does not change color to white. Why?
a { background:black; } a:before { background:red; } a:hover,a:before { background:white } <a href="#">Test</a> you try to color the nested link, you just need to put a comma in the string
a:hover, a:before { background:white } You can use the a:hover:before construct to change the content in :before when you hover over a link.
a { color:red; background:black; } a:before { content: ">>>"; width: 50px; color: black; background:red; } a:hover, a:hover:before { background:white } <a url='#'>link</a> Source: https://ru.stackoverflow.com/questions/537946/
All Articles