主頁
CSS
CSS 屬性選擇器
Tryit:[attribute] 選擇器
執行 ❯
建立您
自己的
網站
×
更改方向
儲存程式碼
更改主題,深色/淺色
前往 Spaces
<!DOCTYPE html> <html> <head> <style> a[target] { background-color: yellow; } </style> </head> <body> <h2>CSS [attribute] Selector</h2> <p>The links with a target attribute gets a yellow background:</p> <a href="https://w3schools.tw">w3schools.com</a> <a href="http://www.disney.com" target="_blank">disney.com</a> <a href="http://www.wikipedia.org" target="_top">wikipedia.org</a> </body> </html>