如何减少一个接一个的多个标题标签的填充?

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

我想减少continue标头标记之间的填充。例如:我的标头标签有填充H1- 30px,H2- 28px,H3- 25px,H4- 22px,H5- 20px,H6- 18px

h2.Hello H2
h3.Hello H3  ----- here it h2 has 28px and h3 has 25px (28+25=53), total 53px is getting padded in between two tag.  instead i need to pad height of two tag padding value i.e., 28px   
<p>Welcome </p>
h2.Hello H2
h2.Hello H2   ----- here it h2 has 28px and h2 has 28px (28+28=56), total 56px is getting padded in between two tag.  instead i need to pad value i.e., 28px 
<p>Welcome </p>
h4.Hello H4 
H5.Hello H5   ----- here it h4 has 22px and h2 has 20px (22+20=42), total 42px is getting padded in between two tag.instead i need to pad height of two tag padding value i.e., 22px   
<p>Welcome </p>

摘要:当我们一个接一个的标题标签时,需要一个逻辑以使其值具有CSS中两个标签中最高的值。

html css css-selectors padding styling
1个回答
-1
投票

您可以使用CSS并减少填充并调整为所需的数量。

CSS

.examplePadding{
padding-bottom: 50px
padding-top: 50px;
padding-left:50px;
padding-right:50px;
}
© www.soinside.com 2019 - 2024. All rights reserved.