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

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

WBOY
Release: 2016-06-24 11:35:11
Original
853 people have browsed it






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 }

 

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template