Home > Web Front-end > HTML Tutorial > How to use ONMOUSEOVER and ONMOUSEOUT to change the background color or background image in HTML_html/css_WEB-ITnose

How to use ONMOUSEOVER and ONMOUSEOUT to change the background color or background image in HTML_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:54:48
Original
2474 people have browsed it

1. Use onmouseout onmouseover to transform between images:

2.onmouseover onmouseout changes the text background color:

onmouseout="style.backgroundColor='#bbb'" bgcolor="#bbb">Text


3..onmouseover onmouseout Change text to background image:

onMouseOut="this.background='2.gif'" background="2.gif">text

2.onmouseover onmouseout Change text background color:

onmouseout="style.backgroundColor='#bbb'" bgcolor="#bbb">Text


3..onmouseover onmouseout Change text to background image:

onMouseOut="this.background='2.gif'" background=" 2.gif">Text

2.onmouseover onmouseout changes the text background color:

onmouseout="style.backgroundColor='#bbb'" bgcolor="#bbb">Text


3..onmouseover onmouseout Change text to background image:

onMouseOut="this.background='2.gif'" background="2.gif">text

2.onmouseover onmouseout Change text Background color:

onmouseout="style.backgroundColor='#bbb '" bgcolor="#bbb">Text


3..onmouseover onmouseout Change text to background image:

onMouseOut="this.background='2.gif'" background="2.gif">text

source:php.cn
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