首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

报价 | quotes

quotes CSS属性指示用户端应该如何渲染引号。

代码语言:javascript
复制
/* 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

语法

noneopen-quoteclose-quote的值content属性不产生引号。

[<string> <string>]+一个或多个对<string>的值

open-quoteclose-quote。第一对代表外层报价,第二对代表第一层嵌套,下一层代表第三层,依此类推。

形式语法

代码语言:javascript
复制
none | [ <string> <string> ]+

HTML

代码语言:javascript
复制
<q>To be or not to be. That's the question!</q>

CSS

代码语言:javascript
复制
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)

?

?

?

?

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com