This article describes a pure CSS to implement the mouse hover hint method. Share to everyone for your reference. The specific analysis is as follows:
This is a more beautiful mouse hover prompt effect, with a pure CSS code to achieve, the mouse placed on the picture will show a layer, that is, hover when the hint, in this box you can also add a picture or a list, depending on your play, the background color of the balloon and text color you can adjust.
The
code is as follows:
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<html xmlns= "http://www.w3.org/1999/xhtml" >
<head>
<meta http-equiv= "Content-type" content= "text/html"; Charset=utf-8 "/>
<title> mouse hover hint effect </title>
<style>
* {
margin:0;
padding:0;
}
Div {
margin:130px;
List-style:none;
}
div img {
border:0;
}
Div a {
color: #fff;
Text-decoration:none;
position:relative;
Display:block;
}
Div span {
font-size:12px;
Display:none;
}
Div a:hover {
background:;
}
Div a:hover span {
padding:3px;
Background:skyblue;
color: #fff;
font-size:9pt;
border-width:1px 2px 2px 1px;
Border-color: #333;
Border-style:solid;
Position:absolute;
top:-30px;
left:0;
Display:block;
}
</style>
</head>
<body>
<div>
<a href= "" >
<img src= "images/wall_s5.jpg" alt= ""/>
<span> Welcome to our regular visit! </span>
</a>
</div>
</body>
</html>
I hope this article will help you with the DIV+CSS web design.