CSS参考手册
Miscellaneous Level 2
报价 | 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
属性不产生引号。
[<string> <string>]+
一个或多个对<string>
的值
open-quote
和close-quote
。第一对代表外层报价,第二对代表第一层嵌套,下一层代表第三层,依此类推。
形式语法
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) |
? |
? |
? |
? |
Miscellaneous Level 2相关
层叠样式表( Cascading Style Sheets )是一种用来表现 HTML 或 XML 等文件样式的计算机语言。CSS 不仅可以静态地修饰网页,还可以配合各种脚本语言动态地对网页各元素进行格式化。