修复h1 font-size!重要的样式大小

问题描述 投票:0回答:2

我在font-size标签中有h1,在许多页面中有各种尺寸,但我想将它们全部标准化为25px,但是当我试图在页面的style部分添加head时,它根本没有反映出变化。如何用所需的覆盖原始的font-size

h1 {font-size: 25px!important}
<h1 align="center">
<span style="font-size: 10pt" lang="ar-sa">
<a style="text-decoration: none" href="example.come">
<font color="#008000">Title here</font></a></span></h1>
html css styles font-size
2个回答
-2
投票

路径存在问题,如果你的html与所有标题相同,那么你可以在你的css中使用这种类型的路径

建议css

h1> span> a {font-size:25px!important}


2
投票

这是你的h1的字体大小,但因为你有span的内联样式。所以你需要覆盖font-size不仅仅是你的h1而是span

h1 span {font-size: 25px!important}
<h1 align="center">
<span style="font-size: 10pt" lang="ar-sa">
<a style="text-decoration: none" href="example.come">
<font color="#008000">Title here</font></a></span></h1>

希望这个答案可以帮到你。

© www.soinside.com 2019 - 2024. All rights reserved.