id 选择器作为派生选择器

纵然被标注为 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 元素也取得了不合的非凡处置。