<div class="box"> <span class="inline"> sphinx - 牛逼 </span> </div> <br /> <div class="box"> <img src="https://godzilla-fe.github.io/Blog/images/avatar.jpeg" alt="" height="50" /> </div>
.box { background: grey; color: white; position: relative; height: 120px; line-height: 120px; } .box:after { content: " "; border-top: 1px solid red; width: 100%; position: absolute; top: 50%; left: 0; } .inline { font-size: 50px } body { font-size: 50px; }