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
WBOYOriginal
2016-06-24 11:54:482476browse

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

Statement:
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