手机
当前位置:查字典教程网 >网页设计 > Div+Css教程 >纯css 实现footer 一直在页面底部,不随页面滚动
纯css 实现footer 一直在页面底部,不随页面滚动
摘要:今天这个案例,我们希望footer一直在页面底部,来看看解决方案吧csshtml,body,#sticker{height:100%;}bo...

今天这个案例,我们希望footer一直在页面底部,来看看解决方案吧

css

html, body, #sticker {height: 100%;}

body > #sticker {height: auto; min-height: 100%;}

#stickerCon {padding-bottom: 40px;}

#footer {margin-top:-40px; height: 40px; width: 100%; text-align: center; line-height: 40px; color: #ABA498; font-size: 12px; background: #fafafa; border-top:1px solid #E7E7E7;}

html

<div id="sticker">

<div id="stickerCon"></div>

</div>

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

【纯css 实现footer 一直在页面底部,不随页面滚动】相关文章:

纯CSS代码实现翻页

一款纯css实现的垂直时间线效果

CSS实例:让页脚保持在未满屏页面的底部

纯CSS结合DIV实现的右侧底部简洁悬浮效果

Div 在页面中居中

css实现强制不换行/自动换行/强制换行

CSS挂马及相应防范方法

div+css实现的滑动门

纯css实现的tab切换效果

css3实现闪亮进度条效果

精品推荐
分类导航