diff --git a/source/_posts/CSS.md b/source/_posts/CSS.md index 269d65d..dca7262 100644 --- a/source/_posts/CSS.md +++ b/source/_posts/CSS.md @@ -110,4 +110,24 @@ a { color: red; } /* 不特定 */ a.some-link { color: white; } /* 有些特定的 */ a#my-link { color: blue; } /* 非常具体的 */ ``` -即使稍后出现不太具体的规则,也是如此。 \ No newline at end of file +即使稍后出现不太具体的规则,也是如此。 + +## 冲突规则 +这是CSS中“级联”的一个重要部分:就像水从边缘滑落一样,最终都在底部形成一个水池,但有些水滴会在其他水滴之前到达那里。 + +假设我们有一下的规则: +```html +

+ Hello World! +

+``` + +```css +p { + color: blue; +} +p { + text-decoration: underline; +} +``` +那现在,我们的Hello World会是怎么样的呢?自己可以尝试一下 \ No newline at end of file