css定位正则匹配和模糊匹配

//所有class包含font-red的p标签
p[class~="font-red"] {color: red;}

[abc^="def"] 选择 abc 属性值以 "def" 开头的所有元素
[abc$="def"] 选择 abc 属性值以 "def" 结尾的所有元素
[abc*="def"] 选择 abc 属性值中包含子串 "def" 的所有元素

posted @ 2020-06-29 15:56  hehehe_wy7  阅读(343)  评论(0编辑  收藏  举报