css布局技巧-【文字居中,左右实线】

    xiaoxiao2021-03-25  65

    效果:

    解决方案:

    1.html5标签

    代码: css: fieldset{ border: none; border-top: 1px solid red; text-align: center; } legend{ padding: 0 10px; } html: <fieldset> <legend>健康信息</legend> </fieldset>

    2.div模拟:

    代码: css: .title{ position: relative; width: 100%; } .tx-center{ width: 160px; margin: 0 auto; text-align: center; background-color: #fff; font-size: 24px; } html: <div class="title"> <div class="tx-center">热门点评任务</div> </div>

    转载请注明原文地址: https://ju.6miu.com/read-39970.html

    最新回复(0)