HTML CSS examples for CSS Widget:Hover
CSS hover for after and before element
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> #box {<!--from www.j av a2 s .c o m--> height:41px; width:100px; background:red; } #box:hover { background:blue; } #box:hover:after { border-top-color:Chartreuse; } #box:after { content:""; height:11px; position:absolute; width:0; margin-top:41px; margin-left:41px; border:11px solid yellow; border-top-color:blue; } </style> </head> <body> <div id="box"></div> </body> </html>