鼠标悬停在CSS上的样式链接

要使用CSS在鼠标悬停时设置链接样式,请使用CSS:悬停选择器。您可以尝试运行以下代码来实现:悬停,选择器,

示例

<!DOCTYPE html>
<html>
   <head>
      <style>
         a:hover {
            background-color: orange;
         }
      </style>
   </head>
   <body>
      <a href = "https://www.google.com">Google</a>
      <p>Keep the mouse cursor on the above link and see the effect.</p>
   </body>
</html>