HTML CSS examples for CSS Widget:Hover to change Color
Hover on an element to change color
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .SomeClass {<!--from w w w . jav a 2s. c om--> color:Chartreuse; } .SomeClass:hover { color:yellow; } #SomeID:hover { color:blue; } </style> </head> <body> <div class="SomeClass"> Lorem </div> <div class="SomeClass" id="SomeID"> Lorem </div> <div class="SomeClass"> Lorem </div> </body> </html>