报价 | quotes
引号
该quotes
CSS属性指示用户端应该如何渲染引号。
/* Keyword value */
quotes: none;
/* <string> values */
quotes: "«" "»"; /* Set open-quote and close-quote to the French quotation marks */
quotes: "«" "»" "‹" "›"; /* Set two levels of quotation marks */
/* Global values */
quotes: inherit;
quotes: initial;
quotes: unset;
Initial value | depends on user agent |
---|---|
应用对象 | all elements |
是否可继承 | yes |
媒体 | visual |
计算值 | as specified |
动画类型 | discrete |
规范顺序 | the unique non-ambiguous order defined by the formal grammar |
语法
值
none
该open-quote
和close-quote
的值content
属性不产生引号。
形式语法
none | [ <string> <string> ]+
例
HTML
<q>To be or not to be. That's the question!</q>
CSS
q {
quotes: '"' '"' "'" "'";
}
q::before {
content: open-quote;
}
q:after {
content: close-quote;
}
结果
注记
从Firefox 3.5开始,引号属性的初始值可以被读取。-moz-initial
这在Firefox的早期版本中是不可能的。
规范
Specification | Status | Comment |
---|---|---|
CSS Level 2 (Revision 1)The definition of 'quotes' in that specification. | Recommendation | Initial definition |
浏览器兼容性
Feature | Chrome | Edge | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|---|
Basic support | 11 | (Yes) | 1.5 | 8.0 | 4.0 | 9.0 (at least) |
Feature | Android | Edge | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Basic support | ? | (Yes) | ? | ? | ? | ? |