HTML CSS examples for CSS Widget:Hover to change Color
Hover to change text color
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> #text1<!-- w ww .ja v a2 s .co m--> { color:Chartreuse; } #text1:hover + #text2 { color:yellow; } #text2 { color:blue; } </style> </head> <body> <h1 id="text1">Lorem</h1> <h1 id="text2">Lorem</h1> </body> </html>