我正在学习CSS.我试着把一些文字写成斜体.但是文字并没有斜体.问题出在哪儿?
.bold {
font-weight: bold;
}
.italic {
font-weight: italic;
}Run Code Online (Sandbox Code Playgroud)
<p>This is some text</p>
<p class="bold">This is some bold text</p>
<p class="italic">This is some italic text</p>Run Code Online (Sandbox Code Playgroud)
fre*_*ler 13
您不能使用调用的CSS命令设置斜体font-weight.
请尝试使用font-style: italic.
.bold {
font-weight: bold;
}
.italic {
font-style: italic;
}Run Code Online (Sandbox Code Playgroud)
<p>This is some text</p>
<p class="bold">This is some bold text</p>
<p class="italic">This is some italic text</p>Run Code Online (Sandbox Code Playgroud)
您为ITALIC提供了错误的属性,请尝试使用此属性并赋予相同的值
.italic{
font-style:italic;
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3155 次 |
| 最近记录: |