DEV Community 👩‍💻👨‍💻

davidka7
davidka7

Posted on

Hover CSS?!

Sometimes you would hover over a text or picture, or any element on the screen and it would have some kind of reaction. Whether the reaction is a difference in background, it glowing, or popping out, this all can be done with some simple CSS tricks.

Let's start by calling our element a p div

Here

Lets say when you hover over you want its background to change from transparent to blue. All you would have to write in your CSS is add the: hover attribute for example like this.

p:hover {
background-color: blue;
}

Top comments (1)

Collapse
 
hassan_k_a profile image
.

I'm suggesting using code pen it is ideal for this kind of situations. presenting new ideas, tips and tricks

Top Heroku Alternatives (For Free)

>> Check out this classic DEV post <<