小编ill*_*gic的帖子

CSS:设置CSS行

.banner-bottom h2 {
  font-size: 2em;
  color: #372568;
  position: relative;
  padding-bottom: 1em;
  text-align: center;
}

.banner-bottom h2:before {
  content: '';
  position: absolute;
  top: 25%;
  left: 25%;
  background: #372568;
  height: 2px;
  width: 8%;
}

.banner-bottom h2:after {
  content: '';
  position: absolute;
  top: 25%;
  right: 25%;
  background: #372568;
  height: 2px;
  width: 8%;
}
Run Code Online (Sandbox Code Playgroud)
<div class="banner-bottom">
  <div class="container">
    <h2>Special Promo</h2>
    <h2>Promo</h2>
    <div>
      <div>
Run Code Online (Sandbox Code Playgroud)

结果:

在此输入图像描述

如何根据编写示例的长度css其行如下:

在此输入图像描述

html css

10
推荐指数
2
解决办法
502
查看次数

标签 统计

css ×1

html ×1