CSS to implement the mouse to move the picture to achieve the switch function

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.