即使被标注为 sidebar 的元素只能在文档中涌现一次,这个 id 决定器作为派生决定器也或是被运用很频繁:
#sidebar p {
font-style: italic;
text-align: right;
margin-top: 0.5em;
}
#sidebar h2 {
font-size: 1em;
font-weight: normal;
font-style: italic;
margin: 0;
line-height: 1.5;
text-align: right;
}
在这里,与页面中的此外 p 元素显明不同的是,sidebar 内的 p 元素失掉了非凡的处置,同时,和页面中其它所有 h2 元素明显分歧的是,sidebar 中的 h2 元素也获得了分歧的非凡措置。
如需转载,请注明文章出处和来源网址:http://www.divcss5.com/html/h53014.shtml








