CSS3 Tool Tip

hi,This is CSS tool tip.tool tip is mean to hover the content display a information .now css  have  hover a text or image to display a   text on the hover a text.






Source Code:



<html>
<head>
<title>CSS3 Tool Tip</title>
<style>
.tool
{
position: relative;
background: #8CC6FF;
cursor: help;
display: inline-block;
text-decoration: none;
color: #222;
outline: none;
}

.tool .span
{
visibility: hidden;
position: absolute;
bottom: 30px;
left: 50%;
z-index: 999;
width: 230px;
margin-left: -127px;
padding: 10px;
border: 2px solid #ccc;
opacity: .9;
background-color: #ddd;
background-image: -webkit-linear-gradient(rgba(255,255,255,.5), rgba(255,255,255,0));
background-image: -moz-linear-gradient(rgba(255,255,255,.5), rgba(255,255,255,0));
background-image: -ms-linear-gradient(rgba(255,255,255,.5), rgba(255,255,255,0));
background-image: -o-linear-gradient(rgba(255,255,255,.5), rgba(255,255,255,0));
background-image: linear-gradient(rgba(255,255,255,.5), rgba(255,255,255,0));
-moz-border-radius: 4px;
border-radius: 4px;
-moz-box-shadow: 0 1px 2px rgba(0,0,0,.4), 0 1px 0 rgba(255,255,255,.5) inset;
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,.4), 0 1px 0 rgba(255,255,255,.5) inset;
box-shadow: 0 1px 2px rgba(0,0,0,.4), 0 1px 0 rgba(255,255,255,.5) inset;
text-shadow: 0 1px 0 rgba(255,255,255,.4);
}

.tool:hover .span
{
visibility: visible;
}

.tool .span:before,
.tool .span:after
{
content: "";
position: absolute;
z-index: 1000;
bottom: -7px;
left: 50%;
margin-left: -8px;
border-top: 8px solid #ddd;
border-left: 8px solid transparent;
border-right: 8px solid transparent;
border-bottom: 0;
}

.tool .span:before
{
border-top-color: #ccc;
bottom: -8px;
}
/* Blue */

.blue-tool .span
{
border-color: #59add4;
background-color: #61bde7;/* U CAN CHANGE ANY BACKGROUND COLOR */

text-align:center;
}

.blue-tool .span:after
{
border-top-color: #61bde7;
}

.blue-tool .span:before
{
border-top-color: #59add4;
}
</style>
</head>
<body>
<h3>CSS3 ToolTip</h3>
<p>Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation semantics (the look and formatting) of a document written in a markup language. Its most common application is to <a href="#" class="tool blue-tool">style web pages<span class="span">written in HTML and XHTML</span></a> , but the language can also be applied to any kind of XML document, including <a href="#" class="tool blue-tool">plain<span class="span"> XML, SVG and XUL.</span></p>
</body>
</html>

No comments:

Post a Comment