html - Css 删除 h 标签中的空白区域

标签 html css html-head

有什么方法可以删除 h 标签顶部的空白区域?

h1 {
  border: 1px solid;
  margin: 0;
  padding: 0;
  line-height: normal;
}
<h1>Test Title yg</h1>

enter image description here

最佳答案

你应该寻找:

h1 {
  border: 1px solid;
  margin: 0;
  padding: 0;
  line-height: 1.4rem;
  padding-bottom: 8px;
}
<h1>Test Title yg</h1>

希望这就是您要找的!
但是HTML特殊字符需要这个空间。
请看一下HTML字符here

关于html - Css 删除 h 标签中的空白区域,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55258507/

相关文章:

javascript - 我想编写一段 javascript 代码来从 koha (An ILS) 获取数据

html - 具有自动播放和覆盖文本的纯 CSS 3 图像 slider

javascript - 当用户单击 'submit' - javascript 或 php 时,使用其上方文本区域中的文本创建一个新的 div

css - Sass 每个函数都在其前面加上美元符号进行编译

html - css标签的html head之间的有效区别? : @import url vs. 链接 href

javascript - 如何将可自定义的颜色更改框下载为带有背景图像的图像?

html - 创建特定的 div 形状(如带尾部的多边形)

javascript - 无法设置 div 顶部属性

css - 为什么 <head> 中有 'This is not a zero-length file'

javascript - 为什么 thenextweb 团队页面包含一个带有 &lt;script&gt; 标签的外部 php 文件