How to change div color on mouse hover using css?

15 votes
189 views
Harsh kumar srivastava asked 16-Nov-2017 in programming by Harsh kumar srivastava

How to change div color on mouse hover using css?

1 Answer

2 votes
Pawan Shukla answered 01-Dec-2017 by Pawan Shukla

you can change div color on mouse hover by using following lines of code:

html code

<div class="test">Article List								

                            </div>

css code

<style>
     .test:hover {
      background-color:grey;
     }
</style>


UTKARSHASINGHROUL commented 20-Feb-2019 by UTKARSHASINGHROUL
Thank You for the help.
       0