Home >Web Front-end >HTML Tutorial >DIV CSS background color change method when mouse is passed_html/css_WEB-ITnose
There are many ways to change the background color when the mouse passes over it. Today we will introduce the method using CSS DIV.
Method 1
The following is the quoted content:
#div:hover{background:#000000;}
Explanation: The background changes color when the mouse passes over the element with the id of div
IE6 .0, Firefox2.0, Opera 9.23 will not work
Method 2
The following is the quoted content:
In this way, as long as it is a connection, it will change. You can use it in a certain area, and all the connections in a certain area will change the mouse. After discoloration.