CSS3 [attribute*=value] 选择器

CSS3 [attribute*=value] 选择器

设置 class 属性值包含 "test" 的所有 div 元素的背景色:

div[class*="test"]
{
    background:#ffff00;
}

 

posted @ 2021-06-09 11:00  几何柒期  阅读(33)  评论(0编辑  收藏  举报