CSS-01

CSS

语法都不说了

一:(几种常用的)选择器:(怎么指定那个标签去设置样式)

1.派生选择器,通过元素在其某位置的上下关系来定义样式

比方说,你希望列表中的 strong 元素变为斜体字,而不是通常的粗体字,可以这样定义一个派生选择器:

li strong {

font-style: italic;

font-weight: normal;

}

请注意标记为 <strong> 的蓝色代码的上下文关系:

<p><strong>我是粗体字,不是斜体字,因为我不在列表当中,所以这个规则对我不起作用</strong></p>

<ol>

<li><strong>我是斜体字。这是因为 strong 元素位于 li 元素内。</strong></li>

<li>我是正常的字体。</li>

</ol>

2.id选择器 用#来定义 使用

<a 。

inherit 规定应该从父元素继承 visibility 属性的值。