Home  >  Article  >  Web Front-end  >  如何垂直居中一个<img>?_html/css_WEB-ITnose

如何垂直居中一个<img>?_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:35:11799browse






super胡





如何垂直居中一个<img>?_html/css_WEB-ITnose



 //如何垂直居中一个<img>?_html/css_WEB-ITnose的容器设置如下

2 {

3     display:table-cell;

4     text-align:center;

5     vertical-align:middle;

6 }

 

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