mirror of
https://github.com/jaywcjlove/reference.git
synced 2025-06-16 12:11:21 +08:00
doc: update css.md
.
This commit is contained in:
18
docs/css.md
18
docs/css.md
@ -1374,10 +1374,11 @@ a[href^="http"]:empty::before {
|
||||
}
|
||||
```
|
||||
|
||||
如果你的 `<a>` 标签里面没有内容,将 `href` 的值作为内容展示
|
||||
如果 `<a>` 标签里面没有内容,将 `href` 的值作为内容展示
|
||||
|
||||
|
||||
### 使用 :root 表示灵活类型
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
响应式布局中的字体大小应该能够根据每个视口进行调整,您可以使用 `:root` 根据视口高度和宽度计算字体大小
|
||||
|
||||
@ -1387,7 +1388,7 @@ a[href^="http"]:empty::before {
|
||||
}
|
||||
```
|
||||
|
||||
现在您可以根据 `:root` 计算的值使用根 `em` 单位:
|
||||
您可以根据 `:root` 计算的值使用根 `em` 单位:
|
||||
|
||||
```css
|
||||
body {
|
||||
@ -1395,6 +1396,19 @@ body {
|
||||
}
|
||||
```
|
||||
|
||||
### 类似 contenteditable 的样式
|
||||
|
||||
```css
|
||||
div {
|
||||
-webkit-user-modify:
|
||||
read-write-plaintext-only;
|
||||
}
|
||||
```
|
||||
<!--rehype:className=wrap-text -->
|
||||
|
||||
通过样式来控制一个元素 `div` 是否可以编辑
|
||||
|
||||
|
||||
另见
|
||||
---------
|
||||
|
||||
|
Reference in New Issue
Block a user