手机
当前位置:查字典教程网 >网页设计 > 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结合DIV实现的右侧底部简洁悬浮效果

用css实现隐藏文本框

大型网站为什么把CSS直接写在页面里?

css实现图片在div中居中的效果

纯CSS代码实现翻页

用CSS实现垂直居中的3种方法

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

纯css实现的下拉菜单只有边框底纹用到图片

css实现body背景图片水平垂直居中方法

精品推荐
分类导航