不同大小的字中部对齐

来源:互联网 发布:linux 判断进程假死 编辑:程序博客网 时间:2024/06/01 10:05

这里写图片描述

<!DOCTYPE html><html>    <head>        <meta charset="UTF-8">        <title></title>        <style type="text/css">            div {                width: 400px;                height: 30px;                background: green;                display :table-cell;            }            span {                height: 30px;                line-height: 30px;                vertical-align:middle ;            }        </style>    </head>    <body>        <div>            <span style="font-size: 12px;">你好</span>            <span style="font-size: 14px;">你好</span>            <span style="font-size: 16px;">你好</span>            <span style="font-size: 18px;">你好</span>            <span style="font-size: 20px;">你好</span>            <span style="font-size: 22px;">你好</span>            <span style="font-size: 24px;">你好</span>        </div>    </body></html>
0 0
原创粉丝点击