Cssフォントスタイルとテキスト装飾プロパティの違いは何ですか?CSSスタイルのフォントスタイルとテキスト装飾スタイル
font-style:italic;
またはtext-decoration:italic;
を使用できますか?どちらが正しいのですか?違いは何ですか?
Cssフォントスタイルとテキスト装飾プロパティの違いは何ですか?CSSスタイルのフォントスタイルとテキスト装飾スタイル
font-style:italic;
またはtext-decoration:italic;
を使用できますか?どちらが正しいのですか?違いは何ですか?
text-decoration: italic
は無効なマークアップです。
text-decoration
とfont-style
の両方に有効な値があります。
none
underline
line-through
overline
text-decoration
は、以下の値を持つことができます
font-style
を持つことができますどこに:スタイルの
normal
italic
oblique
デモ:
<p style="text-decoration: none">This is a text (text-decoration: none)</p>
<p style="text-decoration: underline">This is a text (text-decoration: underline)</p>
<p style="text-decoration: line-through">This is a text (text-decoration: line-through)</p>
<p style="text-decoration: overline">This is a text (text-decoration: overline)</p>
<p style="font-style: normal">This is a text (font-style: normal)</p>
<p style="font-style: italic">This is a text (font-style: italic)</p>
<p style="font-style: oblique">This is a text (font-style: oblique)</p>
あなたは私たちに尋ねるのではなく、この自分で読んでみませんか? ここで質問をする前に_努力をしてください。 https://developer.mozilla.org/en-US/docs/Web/CSS/font-style、https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration – CBroe
'italic 'は' text-decoration'のための有効な値ではありません – Tanmay