我有这样的HTML:
<!DOCTYPE html> <head> <Meta charset="utf-8"> <!--[if lte IE 8]> <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> </head> <body> <header> <h1>Some title thing,who knows</h1> <nav> <ul> <li><a href="one/">One</a></li> <li><a href="two/">Two</a></li> <li><a href="three/">Three</a></li> </ul> </nav> </header> </body> </html>
如果我给标题一个自动边距和宽度,它是水平居中的。确保它是垂直居中的最不可怕的方法是什么?
> http://blog.themeforest.net/tutorials/vertical-centering-with-css/
> http://www.vanseodesign.com/css/vertical-centering/
> http://www.jakpsatweb.cz/css/css-vertical-center-solution.html
> http://www.brunildo.org/test/vertmiddle.html