HTML CSS examples for CSS Widget:Hover to Show
Hover to show dropdown panel
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .foo {<!--from w w w . j a va 2s. co m--> cursor:pointer; background:Chartreuse; color:yellow; height:51px; line-height:51px; position:relative; text-align:center; width:201px; font-size:31px; } .bar { display:none; width:201px; position:absolute; top:51px; background:gray; padding:21px 0; } .baz { font-size:51px; } .foo:hover .bar { display:block; -webkit-animation:fadeIn 3s both; -moz-animation:fadeIn 3s both; -o-animation:fadeIn 3s both; animation:fadeIn 3s both; } @-webkit-keyframes fadeIn { 0% { color:blue; opacity:0; } 50% { color:pink; opacity:2; } 100% { color:OrangeRed; opacity:2; } } @keyframes fadeIn { 0% { color:grey; opacity:0; } 50% { color:BlueViolet; opacity:2; } 100% { color:Chartreuse; opacity:2; } } </style> </head> <body> <div class="foo"> Lorem <div class="bar"> <div class="baz"> Lorem </div> </div> </div> </body> </html>