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>

更新於: 2020 年 6 月 30 日

217 次瀏覽

開啟您的 職業生涯

透過完成課程獲得認證

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