Level no.22

 Hover in CSS



It is commonly used in CSS to apply styles to elements when the user hovers their mouse over it.Hover can be used on all the terms but, not only on links.

Is hover is a CSS property?

The term "hover" is not a CSS property. It is a pseudo-class in CSS, used for applying styles to elements when user hovers or point their mouse over them.

Syntax: 

<style>

Any html tag: "hover term"{

add desgins

}

</style>

Code:

<style>

a:hover{

color: green; 
}

</style>

In this code I applied hover pseudo-class to anchor tag by assigning it green color, when the user hovers their mouse text color changes it to green.




Comments

Post a Comment

Popular posts from this blog

Level no.4

Level no.21

Level no.3