Home >Web Front-end >JS Tutorial >Use div css to realize that when the mouse is placed on it, the background and image will change. _javascript skills

Use div css to realize that when the mouse is placed on it, the background and image will change. _javascript skills

PHP中文网
PHP中文网Original
2016-05-16 19:12:161348browse

php code

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 
<HTML> 
 <HEAD> 
  <TITLE> New Document </TITLE> 
  <META NAME="Generator" CONTENT="EditPlus"> 
  <META NAME="Author" CONTENT=""> 
  <META NAME="Keywords" CONTENT=""> 
  <META NAME="Description" CONTENT=""> 
  <style type="text/css"> 
    ul{ 
        list-style:none; 
    } 
    a{ 
        padding-left:1.5em;font-size:12px;height:23px;line-height:23px;color:gray;text-decoration:none; 
    } 
    a:link,a:visited{ 
        background:url(/article/upimages/bbs_bg_off.gif); 
    } 
    a:hover,a:active{ 
        background:url(/article/upimages/bbs_bg_on.gif); 
    } 
  </style> 
 </HEAD> 

 <BODY> 
<ul> 
    <li><a href="test">移动背景变换</a></li> 
    <li><a href="test">移动背景变换</a></li> 
    <li><a href="test">移动背景变换</a></li> 
    <li><a href="test">移动背景变换</a></li> 
    <li><a href="test">移动背景变换</a></li> 
</ul> 

 </BODY> 
</HTML>
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