HTML CSS examples for CSS Widget:Color
make 2 different spans change color on hover
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> #container<!--from w w w . j a va 2 s .com--> { background-color: white; } #container:hover .type1 { color: red; } </style> </head> <body> <div id="container"> <span class="type1">Blah</span> <span class="type2">Foo</span> <span class="type1">Blah</span> </div> </body> </html>