使用 CSS 样式活动链接


若要对活动链接设置样式,请使用 CSS :active 选择器。你可以尝试运行以下代码来对活动链接设置样式

示例

动态演示

<!DOCTYPE html>
<html>
   <head>
      <style>
         a:active {
            background-color: green;
         }
      </style>
   </head>
   <body>
      <a href = "https://qries.com">Welcome to Qries</a>
      <p>Click on the above link to see the effect.</p>
   </body>
</html>

上次更新时间:2020-06-30

807 浏览

启动你的职业

完成课程取得认证

入门
广告
© . All rights reserved.