CSS3 [attribute^=value] 选择器 设置 class 属性值以 "test" 开头的所有 div 元素的背景色: div[class^="test"] { background:#ffff00; }