手机
当前位置:查字典教程网 >网页设计 > 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实现图片在div中居中的效果

CSS DIV实现Yahoo搜索框的制作

css中替换元素和不可替换元素

用css实现隐藏文本框

css实现li中文本超出行宽自动隐藏

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

纯css实现的tab切换效果

一款纯css3实现的动画加载导航

精品推荐
分类导航