doc: add the cascade of CSS section

This commit is contained in:
Leon Xu committed 2021-08-08 14:22:01 -07:00
1 parent 01990a8d9c
commit 51360f2e4f
1 file changed
+8 -1
+8 -1
View File
@@ -130,4 +130,11 @@ p {
text-decoration: underline;
}
```
那现在,我们的Hello World会是怎么样的呢?自己可以尝试一下
那现在,我们的Hello World会是怎么样的呢?自己可以尝试一下
## CSS的级联
所有样式都是“层叠”的,从顶部到底部:
- 当您添加第二个文件时,冲突的规则将被覆盖
- 如果可能的话,注意不要覆盖样式
- 如果你有特定于页面的样式,使用第二个工作表(通常在共享的工作表之后链接)
当有冲突的选择器但属性不同时,样式“级联”在一起。