Home  >  Article  >  Web Front-end  >  图片垂直居中对齐_html/css_WEB-ITnose

图片垂直居中对齐_html/css_WEB-ITnose

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

<!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 img{        display:inline-block;        width:100%;        vertical-align:middle;    }    </style></head><body>    <div class="box">        <img  src="finish.png" alt="图片垂直居中对齐_html/css_WEB-ITnose" >    </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