Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
哪些 CSS 网格框架修复(或解决方法) div 内容垂直对齐问题? http://phrogz.net/CSS/vertical-align/index.html
如果 IE7 不相关。您可以使用 CSS 属性display: table-cell将内容垂直居中。
display: table-cell
这是一个示例(图像丢失,但您应该明白):
http://jsfiddle.net/uB3pW/
您还可以使用它来构建具有宽度、列和所有内容的网格。