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中文网
Release: 2016-05-16 19:12:16
Original
1349 people have browsed it

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>
Copy after login
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