Home >Web Front-end >CSS Tutorial >Usage of :hover pseudo-class in CSS

Usage of :hover pseudo-class in CSS

PHPz
PHPzforward
2023-09-06 18:45:03760browse

CSS 中 :hover 伪类的用法

The :hover pseudo-class is used to add special styling to an element when you hover the mouse over it. Possible values ​​can be color names in any valid format.

Example

<html>
   <head>
      <style>
         a:hover {
            color: #FFCC00
         }
      </style>
   </head>
   <body>
      <a href = "">Bring Mouse Here</a>
   </body>
</html>

The above is the detailed content of Usage of :hover pseudo-class in CSS. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete