在CSS中如何更改h1和h2的字体大小 [英] In CSS how do you change font size of h1 and h2
问题描述
一句话按二十一个主题。我想更改标题
的大小,如下所示,将标题环绕在h1和h2标签上
In a word press twenty eleven theme. I want to change the size of headings When I wrap my headings around h1 and h2 tags as follows
<h1>My h1 heading </h1>
<h2> My h2 heading </h2>
我正在使用的主题标题的字体大小与内容的字体几乎相同,除了它们是胆大。所以我的标题不太醒目。
The font size of heading in the theme I am using is almost same as content's font except that they are bold. So my headings are not quite prominent.
我想我需要更改css文件中的某些内容。请告知确切需要放入的内容。
I guess I would need to change something in the css file. Please advise what exactly in need to put in.
谢谢
推荐答案
h1 {
font-weight: bold;
color: #fff;
font-size: 32px;
}
h2 {
font-weight: bold;
color: #fff;
font-size: 24px;
}
请注意,在颜色之后,您可以使用单词(例如白色
),十六进制代码(例如 #fff
)或RGB(例如 rgb(255,255,255)
)或RGBA(例如 rgba(255,255,255,0.3)
)。
Note that after color you can use a word (e.g. white
), a hex code (e.g. #fff
) or RGB (e.g. rgb(255,255,255)
) or RGBA (e.g. rgba(255,255,255,0.3)
).
这篇关于在CSS中如何更改h1和h2的字体大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!