CSS3 [attribute$=value] 選擇器
定義和用法
[attribute$=value] 選擇器匹配元素屬性值帶指定的值結(jié)尾的元素。

實(shí)例
實(shí)例 2
設(shè)置class屬性值以"test"結(jié)尾的所有div元素的背景顏色:
div[class$="test"]
{
background:#ffff00;
}
{
background:#ffff00;
}
嘗試一下 ?
瀏覽器支持
所有主流瀏覽器都支持[attribute$=value] 選擇器。
Note: [attribute$=value]在IE8中運(yùn)行,必須聲明<!DOCTYPE> 。
更多建議: