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