类选择器 | Class selectors (Selectors) - CSS 中文开发手册 - Break易站
2021-01-27 08:14
标签:The raft basic int rop def tps his bre 类选择器 | Class selectors (Selectors) - CSS 中文开发手册 CSS 类选择器根据其class属性的内容匹配元素。 请注意,这相当于以下内容attribute selector: Specification Status Comment Selectors Level 4The definition of ‘class selectors‘ in that specification. Working Draft No changes Selectors Level 3The definition of ‘class selectors‘ in that specification. Recommendation ? CSS Level 2 (Revision 1)The definition of ‘child selectors‘ in that specification. Recommendation ? CSS Level 1The definition of ‘child selectors‘ in that specification. Recommendation Initial definition Feature Chrome Edge Firefox (Gecko) Internet Explorer Opera Safari Basic support (Yes) (Yes) (Yes) (Yes) (Yes) (Yes) Feature Android Chrome for Android Edge Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile Basic support ? ? (Yes) ? ? ? ? 类选择器 | Class selectors (Selectors) - CSS 中文开发手册 - Break易站 标签:The raft basic int rop def tps his bre 原文地址:https://www.cnblogs.com/breakyizhan/p/13222267.html/* All elements with class="spacious" */
.spacious {
margin: 2em;
}
/* All
语法
.class_name { style properties }
[class~=class_name] { style properties }
实例
CSS
div.classy {
background-color: skyblue;
}
HTML
结果
规范
浏览器兼容性
上一篇:系统 | @counter-style.system (Counter Styles) - CSS 中文开发手册 - Break易站
下一篇:空单元 | empty-cells (Miscellaneous Level 2) - CSS 中文开发手册 - Break易站
文章标题:类选择器 | Class selectors (Selectors) - CSS 中文开发手册 - Break易站
文章链接:http://soscw.com/index.php/essay/47664.html