我正在尝试构建一个类似于这的页面,当调整浏览器窗口的大小时,内容保持垂直中心。
到目前为止,我得到的是:
http://codepen.io/realph/pen/svuHI
我试图让.marketing元素保持垂直居中。页脚粘在页面底部,但在调整浏览器窗口大小时也会向上移动。
任何帮助都是非常感谢的。提前谢谢。
发布于 2014-01-16 20:53:36
将此添加到您的.marketing CSS中
position: absolute;
top: 50%;
margin-top: -50px; /* change this to half of the height of the element */https://stackoverflow.com/questions/21171685
复制相似问题