CSS :active 選擇器的作用


使用 CSS :active 選擇器為活動連結設定樣式。你可以嘗試執行以下程式碼來實現 :active 選擇器 −

示例

實際演示

<!DOCTYPE html>
<html>
   <head>
      <style>
         a:active {
            background-color: orange;
         }
      </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-06-2020

217 次瀏覽

開創你的 事業

完成課程獲得認證

開始
廣告
© . All rights reserved.