我试图将字体更改为 <h1>
Bootstrap css 中的标记;这里是
原代码:
<h1 class="text-center"> My Site </h1>
我尝试了以下方法:
<h1 class="text-center" style=font-family: "Arial";> My Site </h1>
<h1 class="text-center" style=font-family: Aria;> My Site </h1>
然而,这些都不起作用。我也尝试过几种基本字体,例如 Verdana、Times New Roman、Courier 等。如果有人能在这里帮助我解决我的问题,我将不胜感激。
最佳答案
在 CSS 中更改字体的方法是这样做:
h1.t {
font-family: "Times New Roman", Times, serif;
}
h1.a {
font-family: "Arial", Helvetica, sans-serif;
}
h1.c {
font-family: "Calibri", Helvetica, sans-serif;
}
<h1 class="t">Times New Roman</h1>
<h1 class="a">Arial</h1>
<h1 class="c">Calibri</h1>
好了,你只需要知道家庭信息,而你没有所有的家庭信息。
关于html - 添加样式后字体样式不变,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41796660/