Java1

CSS [attribute] 选择器

复制代码
<!DOCTYPE html>
<html>
<head>
<style>
a[target] {
  background-color: yellow;
}
</style>
</head>
<body>

<h1>CSS [attribute] 选择器</h1>

<p>带有 target 属性的链接获得颜色背景:</p>

<a href="https://www.baidu.com">baidu.com.cn</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>
复制代码

 

 

posted @ 2022-01-25 03:08  薛定谔的小冰  阅读(28)  评论(0)    收藏  举报