CSS implementation when the mouse hover pop-up description layer effect

Source: Internet
Author: User

CSS implementation when the mouse hover popup description Layer effect:
This section shares a code example, which is a mouse hover pop-up effect that uses a purely CSS implementation.
The code example is as follows:

<!DOCTYPE HTML><HTML> <Head> <MetaCharSet= "Utf-8"> <Metaname= "Author"content= "http://www.softwhy.com/" /> <title>Ant Tribe</title> <style>Div{Clear:both;margin:5px 0 0 0;font-size:12px;Line-height:22px;}A.alt{position:relative;Background-color:#fff;float: Left;width:158px;Height:20px;margin:0 Auto;Border:1px solid #eee;text-align:Center;text-decoration:None;Color:#0066cc;}A.alt:hover{background:#fff;text-decoration:None;Z-index:2;}A.alt span{Display:None;}A.alt:hover span{position:Absolute;Display:Block;Top:-1px; Left:158px;width:130px;Height:30px;Border:1px solid #eee;Z-index:1;}</style></Head><Body><Div><aclass= "Alt"href="/"><span>Front-end Web site</span>Ant Tribe</a></Div><Div><aclass= "Alt"href="/"><span>URL is softwhy.com</span>Antzone</a></Div></Body></HTML>

By default, the span element is hidden, and when the mouse hovers, the following CSS code is immediately active:

A.alt:hover span {  position:absolute;   Display:block;   top:-1px;   Left:158px;   width:130px;   height:30px;   Border:1px solid #eee;   z-index:1;}

Use absolute positioning to position the pop-up layer on the right side of the link.

The original address is: http://www.softwhy.com/forum.php?mod=viewthread&tid=18143

For more information, refer to: http://www.softwhy.com/divcss/

CSS implementation when the mouse hover popup description layer effect

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.