使用 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>

更新時間: 30-6 月 2020

807 個瀏覽

開始你的事業生涯

獲得課程結業證書

開始學習
廣告
© . All rights reserved.