Home  >  Article  >  Web Front-end  >  随意字数文字垂直居中对齐_html/css_WEB-ITnose

随意字数文字垂直居中对齐_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:18:251008browse

<!DOCTYPE html><html lang="en"><head>    <meta charset="UTF-8">    <title>Document</title>    <style type="text/css">    *{        padding:0;        margin: 0;    }    .box{        margin:30px auto;        width:400px;        height:400px;        line-height:400px;        border: 1px solid #bbb;    }    .box p{    display:inline-block;    vertical-align:middle;    line-height:20px;    }    </style></head><body>    <div class="box">        <p>第四季度及山东第四季度及山东第四季度及山东第四季度及山东第四季度及山东第四季度及山东第四季度及山东第四季度及山东</p>    </div></body></html>

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn