Change content of div with background color slowly via color transition - HTML CSS CSS Property

HTML CSS examples for CSS Property:background-color

Description

Change content of div with background color slowly via color transition

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">

#results {<!--from  w  w w . ja va  2s .c o  m-->
   background: #dddada;
   color: 000000;
   cursor: pointer;
   transition: color 1s ease;
   transition: background 1s ease;
}
#results:hover {
   background: red;
   color: black;
}


      </style> 
 </head> 
 <body> 
  <div id="results">
    test data 
  </div>  
 </body>
</html>

Related Tutorials