1
disinfeqt OP <!DOCTYPE HTML>
<html> <head> <meta charset="utf-8"> <title>Perfect Centering</title> <style> html { display:table; height:100%; width:100%; } body { display:table-cell; text-align:center; vertical-align:middle; } </style> </head> <body> <h1>I should've been centered and I'm cool with it.</h1> </body> </html> Sorry sorry,哪里来的高度宽度... 囧 |
2
airwolf 2010-07-24 06:49:52 +08:00 via iPod
Wow, 正好可以用到的,看起来很犀利啊!
Thanks :) |
4
lianghai 2010-07-24 20:27:13 +08:00
哇靠,感慨,原来“display:”这么牛。
|