css - 在CSS中向上移动底部边框

标签 css border

如何使用 css 将底部边距向上推大约 5 个像素?

Here是关于我想要实现的目标的例子:

push up border

最佳答案

虽然您可以使用 line-height,但它可能会搞砸下一行。所以我建议:

h1 {
  font-size: 24px;
  border-bottom: 2px solid #FF6A00;
  /* proposing line height + padding */
  line-height: 20px;
  margin-bottom: 5px;
}

关于css - 在CSS中向上移动底部边框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15584618/

相关文章:

JavaScript 滚动当前 View 的元素 id

jquery - 类型错误 : variable is undefined; i get this error in specific pages

css - td 边框在 IE8 中隐藏在 tr 背景颜色后面

css - iFrame 摆脱白色边框

html - Windows 和 Mac OS X 之间的区别(HTML)DL DT DD 作为列表

javascript - 如何使元素相互交互并使用 jquery 定位

html - 双边框属性导致错误

android - 仅按钮左侧的边框

html - 菜单列表的 Z-index 问题

css - 两个 Angular 线箭头 CSS