Home >Web Front-end >Front-end Q&A >How to use css quotes attribute

How to use css quotes attribute

青灯夜游
青灯夜游Original
2019-05-29 15:44:093401browse

css quotes attribute is used to set the quote type of nested quotes. All major browsers support the quotes attribute, but IE8 needs to define !DOCTYPE to support the quotes attribute.

How to use css quotes attribute

How to use the css quotes attribute?

quotes attribute sets the quote type of nested quotation.

Attribute values ​​that can be set:

● none: Specifies that the values ​​​​of "open-quote" and "close-quote" of the "content" attribute will not produce any quotation marks.

● String string string string: Define the quotation marks to be used. The first two values ​​specify the first level of quote nesting, and the last two values ​​specify the next level of quote nesting.

● inherit specifies that the value of the quotes attribute should be inherited from the parent element.

Quotation mark characters

How to use css quotes attribute

Note: All browsers support the quotes attribute.

Note: Internet Explorer 8 (and later) supports the quotes attribute if !DOCTYPE is specified.

css quotes attribute example

<!DOCTYPE>
<html>
<head>
<meta charset="utf-8"> 
<style type="text/css">
q:lang(en)
{
quotes: &#39;"&#39; &#39;"&#39; "&#39;" "&#39;"
}
</style>
</head>
<body>
<p><q>This is a <q>big</q> quote.</q></p>
<p><b>注释:</b>如果已规定 !DOCTYPE,那么 Internet Explorer 8 (以及更高版本)支持 quotes 属性。</p>
</body>
</html>

Rendering:

How to use css quotes attribute

The above is the detailed content of How to use css quotes attribute. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn