How to make anchor text glow when anchor link is clicked?


Hello guys!

I want that whenever I press a anchor link on my blog then when it will navigate to that anchor id then the text or whatever is there on the id should glow. for example this is the id #mbt whenever I click the anchor link it will take me to the place where id is attached so that place should glow

I am not able to explain it clearly :sweat_smile: If someone understands my question then please help me :blush:

Thanx ~ Nafees Khan :wink:


Hello @Nafees @Shivansh Has Given You The Answer :smile:


@Nafees, you can do this by using :target pseudo as following:

<section id="voters"> 

And CSS:

voters:target {
   background: yellow;

Done! Now when anyone will click on anchor link, β€˜Content’ will turn yellow. :smile:

For more type of effects, see this