CSS 智能置底

<!DOCTYPE html>
<html>
<head>
    <title></title>
    <style type="text/css">
*{
    padding: 0;
    margin: 0;
}
html{
    height: 100%;
}
body{
    position: relative;
    min-height: 100%;
}
.a{
    height: 600px;
}
.b {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: #ccc;
}
    </style>
</head>
<body>
<div class="a"></div>
<div class="b"></div>
</body>
</html>
posted @ 2017-08-14 14:54  p2world  阅读(237)  评论(0编辑  收藏  举报