1. 程式人生 > >中間有文字的分割線效果

中間有文字的分割線效果

display round ack height style alt itl font splay

技術分享圖片

<div class="with_lineTitle">
  <span class="line"></span>
  <span class="Tbox">我是標題</span>
  <span class="line"></span>
</div>

<style>

.with_lineTitle{display: flex;align-items: center;justify-content: center;}
.with_lineTitle .line{height: 1px;background-color: red;width: 100px;}


.with_lineTitle .Tbox{padding: 0px 10px;}

</style>

中間有文字的分割線效果