CSS implementation of the mouse moving the picture to achieve the switch function:
When the mouse is placed on a picture can switch to other pictures, using JavaScript can be implemented, the following describes how to use CSS to implement this function.
The code example is as follows :
<!DOCTYPE HTML><HTML><Head><MetaCharSet= "Utf-8"><Metaname= "Author"content= "http://www.softwhy.com/" /><Head><title>CSS implementation of image switching effect-ant tribe</title><styletype= "Text/css">* {margin:0;padding:0;}ul Li{List-style:None;}. Nav{width:800px;Height:40px;margin:150px Auto;}. Nav ul Li{float: Left;width:200px;}. Nav ul Li A:link, a:visited{Display:Block;width:190px;Height:40px;background:URL (images/wall_s1.jpg);}. Nav ul li A:hover{background:URL (images/wall_s2.jpg);}. Nav ul Li A:active{background:URL (images/wall_s3.jpg);}</style></Head><Body><Divclass= "NAV"> <ul> <Li><ahref="#"></a></Li> <Li><ahref="#"></a></Li> <Li><ahref="#"></a></Li> </ul></Div></Body></HTML>
The above code is implemented, when the mouse is placed on the link, can realize the switch function of the picture .
The original address is: http://www.softwhy.com/forum.php?mod=viewthread&tid=8354
For more information, refer to: http://www.softwhy.com/divcss/
CSS to implement the mouse to move the picture to achieve the switch function