Home > Web Front-end > HTML Tutorial > DIV CSS background color change method when mouse is passed_html/css_WEB-ITnose

DIV CSS background color change method when mouse is passed_html/css_WEB-ITnose

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-24 12:30:11
Original
1950 people have browsed it

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:

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template