quotesプロパティ
quotesプロパティは、<q>エレメントの引用符を定義するプロパティです。
設定されたエレメント内の<q>エレメントに反映されます。
引用符""、''、「」などを設定することができます。擬似エレメント::beforeや::afterにcontentプロパティを合わせて使います。
引用符は入れ子にするこtができ、2つ目まで定義できます。
p{ quotes: "「" "」"; } q::before{ content: open-quote; } q::after{ content: close-quote; }
構文(Syntax)
CSS
quotes: none | [ string string ] | initial | inherit;
DOM(JavaScript)
String = object.style.quotes;
object.style.quotes="none | [ string string ] | initial | inherit";
値(Values)
引用符は入れ子が2つ目まで定義できます。2つ目まで定義するには、string string string stringと任意の文字を4つ並べます。 1番目と2番目が第1引用符のopen-quoteとclose-quote、3番目と4番目が入れ子になる引用符のopen-quoteとclose-quoteになります。
Value | 摘要 |
---|---|
none | 初期値(default値) |
string string | 任意の文字列、第1引数がopen-quote、第二引数がclose-quote |
initial | 初期値に戻す |
inherit | 親エレメントのプロパティを継承 |
備考(Remarks)
初期値(Default value) | |
継承(Inherited) | Yes |
CSS Animation | No |
Example
quotesの例です。エレメントにquotesプロパティを指定すると<q>で引用符が付加されます。
ここでは引用符は付加されたところが分かりやすいように<q>エレメントを太字で表示していています。
関連(Related)
HTML、CSS、DOMのテキスト、フォント、編集用途の一覧です。
HTML
- リンク
- <a>
- テキスト
- <br>、 <h2-h6>、 <hr>、 <p>
- マーカー
- <mark>
- 書式方向
- <bdi>、 <bdo>
- 単語の扱い
- <wbr>
- プログラムコード例
- <code>、 <kbd>、 <pre>、 <samp>、 <var>
- 化学式、数式
- <sub>、 <sup>
- 削除された内容や追記された内容の補足
- <del>、 <ins>
- 引用や定義、出典を明示
- <abbr>、 <address>、 <blockquote>、 <q>、 <cite>、 <dfn>
- 日時
- <time>
- ?データ用?
- <data>
- スカラー値、ゲージ
- <meter>、 <progress>
- ルビ
- <rp>、 <rt>、 <ruby>
CSS
- フォント
- color、 font、 font-family、 font-feature-settings、 font-kerning、 font-size、 font-stretch、 font-style、 font-variant、 font-variant-caps、 font-weight
- テキスト配置
- letter-spacing、 line-height、 overflow-wrap、 tab-size、 text-align、 text-align-last、 text-combine-upright、 text-indent、 text-justify、 text-overflow、 vertical-align、 white-space、 word-break、 word-spacing、 word-wrap
- 回り込み
- clear、 float
- テキスト装飾
- text-decoration、 text-decoration-color、 text-decoration-line、 text-decoration-style、 text-shadow、 text-transform、 text-underline-position
- 書式方向
- direction、 text-orientation、 writing-mode
- 自動挿入
- content、 counter-increment、 counter-reset、 quotes
- 改行
- box-decoration-break、 hyphens
- ユーザー操作
- user-select
DOM
- インターフェイス
- ClipboardEvent
- イベント
- copy、 cut、 paste
- プロパティ
- メソッド