CSS Pseudo Classes Example




CSS Pseudo Classes Example

<!DOCTYPE HTML>
<html>
   <head>
   <style>
      div {
         background-color: #7FFF00;
         color: white;
         padding: 25px;
         text-align: center;
      }
      div:hover {
         background-color: blue;
      }
    </style>
</head>
<body>
<p>Mouse over the div element below to change its background color:</p>
<div>Mouse Over Me</div>
</body>
</html>

Output