【问题标题】:How to implement a sectioning feature in html [duplicate]如何在 html 中实现分段功能 [重复]
【发布时间】:2014-05-22 10:23:44
【问题描述】:

如何在 html 中实现可以分隔部分的内容,例如,一条简单的行...

第 1 节: 哈哈哈哈哈哈


第 2 节: 哈哈哈哈哈哈

因为到目前为止,我的 html 看起来像这样:

第 1 节: 哈哈哈哈哈哈

第 2 节: 哈哈哈哈哈哈

我用过<br>,但我认为如果有某种实际的分隔符会更好看。

【问题讨论】:

标签: html css


【解决方案1】:

您刚刚在帖子中使用了hr
这是另一种方法。

HTML:

<span class="section">Section 1: BLAH BLAH BLAH</span>
<span class="section">Section 2: BLAH BLAH BLAH</span>

CSS:

.section{
    border-bottom:1px solid gray;
}
.section:last-child{
    border-bottom:0px;
}

【讨论】:

  • 谢谢你,效果很好。
猜你喜欢
  • 2020-03-03
  • 2021-04-07
  • 2014-07-15
  • 2018-06-23
  • 2020-07-31
  • 2020-04-07
  • 2019-07-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多