<div class="content"> <div class="line"></div> <div class="txt">文字内容</div> <div class="line"></div> </div>
.content { display: flex; align-items: center; justify-content: center; .txt { margin: 0 10px; vertical-align: -8%; } .line { 100px; border-top: 1px solid #ccc; } }