StupidBeauty
Read times:399Posted at:Thu Oct 27 19:39:10 2011
- no title specified

转载:CSS竖直对齐vertical-align属性详解

http://www.noahlu.com/blog/website-design/css-vertical-align/

亮点:

方法二:

这个方法同样有两个前提条件:

  1. 1.你只有一行文字需要竖直居中

  2. 2.你能给父元素设定固定高度

符合这个条件可以使用此解决办法,很简单:设置父元素line-height与其固定高度相同即可。
示例代码:

<style>

#myoutercontainer2 { line-height:4em }

</style>

...

<p>

Hey, this is vertically centered. Yay!

</p>

Your opinions
Your name:Email:Website url:Opinion content:
- no title specified

HxLauncher: Launch Android applications by voice commands

 
Recent comments
2017年4月~2019年4月垃圾短信排行榜Posted at:Thu Sep 26 04:51:48 2024
Qt5.7文档翻译:QWebEngineCookieStore类,QWebEngineCookieStore ClassPosted at:Fri Aug 11 06:50:35 2023盲盒kill -9 18289 Grebe.20230517.211749.552.mp4