当网页内容区content东西很少时,footer就会跑到上边来?
我给body,html设min-height:100%;没有作用,
设置height:100%;就好了,但是内容多了就在一屏下?
body,html{
min-height:100%;
}
body{
position:relative;
}
.content{
podding-bottom:100px;
}
.footer{
position:absolute;
bottom:0;
left:0;
height:100px;
}
这样写:
上面的代码兼容到 IE8 及以上