Home  >  Article  >  Web Front-end  >  css多行文本垂直居中_html/css_WEB-ITnose

css多行文本垂直居中_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-21 08:52:371141browse

1. .outer {  display:table; width:578px; overflow:hidden;   background: #eee; height: 42px;}.middle {display:table-cell; vertical-align:middle; margin-left 10px;} /*下面的CSS是针对IE7,IE6*/<!--[if lte IE 7]><style>.outer{position:relative;}.middle{position: absolute; top: 50%;}.inner{position: relative; top:-50%}</style><![endif]-->2.(ie8+) .outer{    height: 271px;    line-height: 271px;    font-size: 0px;}#special-price .special-price-content .content li .mask p {    font-size: 16px;    line-height: 1.5;    display: inline-block;    vertical-align: middle;}



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