After customizing css for tooltip with data-title - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Tooltip

Description

After customizing css for tooltip with data-title

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
.tooltip {<!--  w  w  w .jav  a 2  s. c o m-->
   display:inline;
   position:relative;
}

.tooltip:hover:after {
   background:Chartreuse;
   background:yellow;
   border-radius:6px;
   top:27px;
   color:blue;
   content:attr(data-title);
   left:21%;
   padding:6px 16px;
   position:absolute;
   z-index:99;
   width:221px;
}

.tooltip:hover:before {
   border:solid;
   border-color:pink;
   border-width:0 7px 7px 7px;
   top:21px;
   content:"";
   left:51%;
   position:absolute;
   z-index:100;
}
</style> 
 </head> 
 <body> 
  <br> 
  <br> 
  <br> 
  <br> 
  <a href="#" data-title="This is some information for our tooltip." class="tooltip"> <span>CSS3 Tooltip</span> </a>  
 </body>
</html>

Related Tutorials