基本选择器
通配符选择器 *
* { margin:0; padding:0;}
id选择器 #
#id { color: red;}
类选择器 .
.class { color: red;}
元素选择器 元素名
p { color: red;}
后代选择器 空格
p { color: red;}
基本选择器扩展
子元素选择器 #wrap > .inner
相邻兄弟选择器 #wrap #first +. inner
属性选择器`
/* 属性名选择器 */ a[title] { color: red; }
/* 属性值选择器 */ a[title="link"] { color: red; }
/* 属性值包含选择器 */ a[title~="link"] { color: red;
}