mirror of
https://github.com/jaywcjlove/reference.git
synced 2025-06-17 04:31:22 +08:00
doc: update docs/css.md
This commit is contained in:
14
docs/css.md
14
docs/css.md
@ -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) ")";
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
另见
|
另见
|
||||||
---------
|
---------
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user