在线文档教程
CSS

报价 | 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 valuedepends on user agent
应用对象all elements
是否可继承yes
媒体visual
计算值as specified
动画类型discrete
规范顺序the unique non-ambiguous order defined by the formal grammar

语法

noneopen-quoteclose-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的早期版本中是不可能的。

规范

SpecificationStatusComment
CSS Level 2 (Revision 1)The definition of 'quotes' in that specification.RecommendationInitial definition

浏览器兼容性

FeatureChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Basic support11(Yes)1.58.04.09.0 (at least)

FeatureAndroidEdgeFirefox Mobile (Gecko)IE PhoneOpera MobileSafari Mobile
Basic support?(Yes)????