HTML CSS examples for CSS Widget:Hover
Apply style from start to the hovered element with :not(:last-child)
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> span {<!-- w ww. ja v a2s. c o m--> display:inline-block; outline:2px solid red; padding:6px; } span>i { float:right; height:21px; width:21px; outline:2px solid blue; cursor:pointer; } span>i:not(:last-child) { margin-left:11px; } span>i:hover, span>i:hover~i { background-color:Chartreuse; } </style> </head> <body> <span> <i></i> <i></i> <i></i> <i></i> <i></i> </span> </body> </html>