Home > Web Front-end > HTML Tutorial > css遇到的垂直水平居中(个人学习笔记)_html/css_WEB-ITnose

css遇到的垂直水平居中(个人学习笔记)_html/css_WEB-ITnose

WBOY
Release: 2016-06-21 08:53:25
Original
1210 people have browsed it

垂直方向上的文字居中(适配所有浏览器):

html代码:

<div class="vertical">content</div>
Copy after login

css代码:

.vertical { height: 100px; line-height: 100px;/*值等于元素高度的值*/ }
Copy after login

待续.....

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