Files
freeCodeCamp/guide/chinese/css/selectors/pseudo/link/index.md

26 lines
432 B
Markdown
Raw Normal View History

---
title: Link
localeTitle: 链接
---
## 链接
`:link` CSS伪类用于定位具有`href`属性的所有未访问元素(例如,锚`<a>`元素),即使`href`具有空值。
一般语法:
```css
target:link
```
## 例
```css
/* Selects any <a> that has not been visited yet */
a:link {
color: red;
}
```
#### 更多信息:
* [链接MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/:link)