html tutorial - How to animate text color on mouse hover using CSS - html5 - html code - html form



Answer: Use the CSS3 transition property

    By using CSS3 transition it make smoothly to animate the text color of an element on mousehover, like a paragraph of text.

    Example

      <!DOCTYPE html>
      <html lang="en">
      <head>
      <meta charset="UTF-8">
      <title>CSS Smooth Text Color Transition - html5 - html code - html form - In 30Sec by Microsoft Award MVP - | wikitechy</title>
      <style type="text/css">
          a {
              margin: 25px;
              -webkit-transition: color 2s; /* For Safari 3.0 to 6.0 */
              transition: color 2s; /* For modern browsers */
          }
          a:hover {
              color: #ff0000;
          }
      </style>
      </head>
      <body>
          <h1><a href="#">Hover on me</a></h1>
      </body>
      </html>

      Related Searches to How to animate text color on mouse hover using CSS