问题:
I want to center a div
vertically with CSS. 我想用CSS将div
垂直居中。 I don't want tables or JavaScript, but only pure CSS. 我不需要表或JavaScript,而只需要纯CSS。 I found some solutions, but all of them are missing Internet Explorer 6 support. 我找到了一些解决方案,但是所有这些解决方案都缺少Internet Explorer 6支持。
<body>
<div>Div to be aligned vertically</div>
</body>
How can I center a div
vertically in all major browsers, including Internet Explorer 6? 如何在所有主要浏览器(包括Internet Explorer 6)中垂直居中放置div
?
解决方案:
参考一: https://stackoom.com/question/1f3R/如何将所有浏览器的div垂直居中参考二: https://oldbug.net/q/1f3R/How-to-vertically-center-a-div-for-all-browsers
来源:oschina
链接:https://my.oschina.net/u/3797416/blog/3220761