CSS quotes 属性
實例
q:lang(en) { quotes: '"' '"' "'" "'"; }
HTML 碼:
<html lang="en"> <head> </head> <body> <p><q>This is a <q>big</q> quote</q></p> </body> </html>
輸出:
"This is a 'big' quote"
CSS 語法
quotes: none|string|initial|inherit;
屬性值
值 | 描述 |
---|---|
none | 規定 "content" 屬性的 "open-quote" 和 "close-quote" 的值不會產生任何引號。 |
string string string string |
定義要使用的引號。 前兩個值規定第一級引用嵌套,後兩個值規定下一級引號嵌套。 |
inherit | 規定應該從父元素繼承 quotes 屬性的值。 |
技術細節
默認值: | not specified |
---|---|
繼承性: | yes |
版本: | CSS2 |
JavaScript 語法: | object.style.quotes="none" |
引號字符

瀏覽器支持
表格中的數字注明了完全支持該屬性的首个瀏覽器版本。
Chrome | IE / Edge | Firefox | Safari | Opera |
---|---|---|---|---|
11.0 | 8.0 | 1.5 | 5.1 | 4.0 |
註釋:如果已規定 !DOCTYPE,則 Internet Explorer 8 (以及更高版本)支持 quotes 屬性。