CSS [attribute~=value] 選擇器
實(shí)例
選擇 titile 屬性包含單詞 "flower" 的元素,并設(shè)置其樣式:
[title~=flower]
{
background-color:yellow;
}
定義和用法
[attribute~=value] 選擇器用于選取屬性值中包含指定詞匯的元素。
選擇 titile 屬性包含單詞 "flower" 的元素,并設(shè)置其樣式:
[title~=flower]
{
background-color:yellow;
}
[attribute~=value] 選擇器用于選取屬性值中包含指定詞匯的元素。