HTML CSS examples for CSS Widget:Color
Change a separate div color on hover
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> #mycolor:hover + #tobechanged {<!--from ww w .ja v a2 s .c o m--> background:yellow; } </style> </head> <body> <div id="mycolor"> <a id="changecolor">Change Color</a> </div> <div id="tobechanged"> Change My Color </div> </body> </html>