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

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

WBOY
WBOYOriginal
2016-06-21 08:53:251199browse

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

html代码:

<div class="vertical">content</div>

css代码:

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

待续.....

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