style h1 inside a div

user2952265

I want to style a h1 headline inside a div, but no matter what I try it always remains bold.

js fiddle

html

<div class="header">
<h1> Hello World </h1>

css

.header h1{
font-style: normal;
color: grey;
}
Álvaro González

font-style has nothing to do with bold:

The font-style CSS property allows italic or oblique faces to be selected within a font-family.

You want font-weight instead:

The font-weight CSS property specifies the weight or boldness of the font. However, some fonts are not available in all weights; some are available only on normal and bold.

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

H1造成div之间的差距

来自分类Dev

将h1移至div的底部

来自分类Dev

H1中的居中div

来自分类Dev

将固定div放置在相对div / h1上方

来自分类Dev

在div中定位h1时出现问题

来自分类Dev

div中的H1取消jQuery动画

来自分类Dev

div中的h1样式

来自分类Dev

如何将H1在div中垂直居中?

来自分类Dev

如何编辑不包含H1标签的div的CSS?

来自分类Dev

div样式与h1相同吗?

来自分类Dev

在jQuery语法中添加H1和div元素?

来自分类Dev

按H1名称排序Div

来自分类Dev

将H1对准DIV的右下角

来自分类Dev

div仅在Chrome中与h1重叠

来自分类Dev

在div内定位h1时遇到麻烦

来自分类Dev

<h1> 后跟 <div display: block> => 没有断线?

来自分类Dev

Why does a <h2> inside a <h1> not inherit the value of color property?

来自分类Dev

为什么我的H1标头孩子覆盖了我的div父母尺寸?为什么我不能正确操作h1?

来自分类Dev

CSS:浮动div中的标题H1重叠

来自分类Dev

CSS过渡悬停(div内的h1似乎无法正常工作)

来自分类Dev

如何使div组件超越其他任何组件(h1或p)

来自分类Dev

将H1居中于具有背景色的div中

来自分类Dev

CSS:浮动div中的标题H1重叠

来自分类Dev

使用scrapy或硒从div类中提取h1文本

来自分类Dev

div id =“ textcontent” h1里面有我的ul class =“ navBar”

来自分类Dev

无序列表未与div中的h1对齐

来自分类Dev

如何使带有阴影框的div覆盖其h1子元素?

来自分类Dev

无法将已经存在的 h1 附加到另一个 div

来自分类Dev

如何在PHP中使用DOM解析器为h1,h2等创建<div>?