html - 单行h3下方的奇怪间距
问题描述
我的<h3>
元素在一行时有一些奇怪的空白。当它超过一行时,没有间距。附图片。
h1,
h2,
h3,
h4,
h5,
h6 {
color: #519B96;
line-height: 1!important;
margin: 0 0px 25px;
}
h3 {
font-size: 30px!important;
margin: 40px 0 -10px;
text-align: left;
}
.teal {
color: #519B96!important;
}
<h3 class="teal">«Les Lettres persanes» (1721)</h3>
<p class="p1">
“Les Lettres persanes”, roman qu’il publie dans l’anonymat à Amsterdam en 1721
</p>
解决方案
给你
h1, h2, h3, h4, h5, h6 {
color: #519B96;
line-height: 1!important;
margin: 0 0px 25px; }
h3 {
font-size: 30px!important;
margin: 40px 0 -10px;
text-align: left;
background-color: red;}
.teal {
color: #519B96!important; }
<h3 class="teal">«Les Lettres persanes» (1721)</h3>
<p class="p1">
“Les Lettres persanes”, roman qu’il publie dans l’anonymat à Amsterdam
en 1721
</p>
推荐阅读
- javascript - JavaScript 如何将此 innerText 转换为有效的日期格式?
- arrow-functions - 为什么箭头函数(第 35 行)返回未定义?
- python - 我以前的 MATLAB,现在是 Python 代码中出现这么多错误的原因是什么?
- php - 如何使用其他数据库变量显示 longblob 图像
- javascript - 在字符串中查找特定字符并且不显示其余字符
- azure-ad-b2c - B2C 多语言问题,成功/失败消息以英文显示代替所选的 ui_locales 语言
- c# - 从 SP 读取多个 SELECT 返回的多个值
- nginx - Nginx 禁止 403
- node.js - Apollo Server Express - 无法到达游乐场
- android - 是否可以在颤动的应用栏中自定义抽屉符号?