Skip to content

Commit

Permalink
doc: update docs/css.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Mar 4, 2023
1 parent 7facfea commit 3ddd8d7
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/css.md
Original file line number Diff line number Diff line change
Expand Up @@ -1811,6 +1811,20 @@ div:has(h2):has(ul) {
}
```

### 获取 HTML 元素的属性

```html
<a href="https://example.com">超链接</a>
```

attr HTML 元素的属性名。

```css
a:after {
content: " (" attr(href) ")";
}
```

另见
---------

Expand Down

0 comments on commit 3ddd8d7

Please sign in to comment.