CSS:固定在底部并居中

CSS:固定在底部并居中,第1张

CSS:固定在底部居中

您应该使用这样的粘性页脚解决方案:

* {    margin: 0;}html, body {    height: 100%;}.wrapper {    min-height: 100%;    height: auto !important;    height: 100%;    margin: 0 auto -142px; }.footer, .push {    height: 142px; }

还有其他类似的东西。

* {margin:0;padding:0;}html, body, #wrap {height: 100%;}body > #wrap {height: auto; min-height: 100%;}#main {padding-bottom: 150px;}  #footer {position: relative;    margin-top: -150px;     height: 150px;    clear:both;}.clearfix:after {content: ".";    display: block;    height: 0;    clear: both;    visibility: hidden;}.clearfix {display: inline-block;}* html .clearfix { height: 1%;}.clearfix {display: block;}

与html:

<div id="wrap">    <div id="main" >    </div></div><div id="footer"></div>


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/zaji/5011625.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-11-14
下一篇2022-11-14

发表评论

登录后才能评论

评论列表(0条)

    保存