行之间的大空格,HTML

I have this code in my webpage webcovid19.live

<style>
h1 {

  padding: 20px;
}

h2 {

  padding: 20px;
}

p {

  padding: 20px;

}
h4 {

  padding: 20px;
}

</style>
....
<body>
<p> Data Source : Center for Systems Science and Engineering (CSSE) at Johns Hopkins University (JHU)</p>
<p> Powered by Google Data Studio &amp; Google BigQuery</p>




我只是意识到线之间的大间距是由于我的样式标签所致, 当我删除它时,空格可以,知道吗?我想要这种填充样式...

这是屏幕截图:

spaces screenshot

评论
aad
aad

Change all the padding to padding-left. It will still indent it from the left but will not affect up, down, right:

h1, h2, p, h4 {

  padding-left: 20px;
}
点赞
评论