移动端/pc字体两边对齐

来源:互联网 发布:linux系统分区详解 编辑:程序博客网 时间:2024/05/18 03:45

这个没啥可写的 css3自带的功能,直接贴代码了

<!DOCTYPE html><html lang="en"><head>    <meta charset="UTF-8">    <title>justify-test</title>    <style>        div {            width: 200px;            height: 200px;            background: #ccc;            padding: 10px;            line-height: 50px;        }        span {            display: inline-block;            width: 55%;            padding: 15px 10px;            line-height: 20px;            background: yellow;            text-align: justify;            text-align-last: justify;            text-justify: inter-ideograph;        }    </style></head><body>    <div>        <span>姓名</span>:        <span>联系电话</span>:        <span>收货地址</span>:        <span>用户名</span>:    </div></body></html>
原创粉丝点击