Highlighting a triangle inside div on hover - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Hover on list

Description

Highlighting a triangle inside div on hover

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">
.triangle-up {<!--  w  ww. j  a v a 2  s . com-->
   width:0;
   height:0;
   border-left:51px solid Chartreuse;
   border-right:51px solid yellow;
   border-bottom:100px solid blue;
}

.triangle-up:hover {
   width:0;
   height:0;
   border-left:51px solid pink;
   border-right:51px solid OrangeRed;
   border-bottom:100px solid grey;
}
</style> 
 </head> 
 <body> 
  <div id="container"> 
   <div class="triangle-up"> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials