我是靠谱客的博主 乐观滑板,这篇文章主要介绍html页面上下布局,网页上中下三分布局即上下固定中间自适应,现在分享给大家,希望可以做个参考。

复制代码代码如下:

* {

margin:0;

padding:0;

}

html,

body,

#box {

height:100%;

font:small/1.5 "宋体", serif;

}

body {

text-align:center;

}

#box {

text-align:left;

background:#666;

display:table;

width:80%;

margin:0 auto;

position:relative;

}

#box > div {

display:table-row;

}

#header,

#footer {

background:#fcc;

height:50px;

vertical-align:bottom;

}

#main {

background:#ccf;

}

#main #wrap {

display:table-cell;

background:#ffc;

vertical-align:middle;

}

#text {

text-align:center;

}

测试文本

最后

以上就是乐观滑板最近收集整理的关于html页面上下布局,网页上中下三分布局即上下固定中间自适应的全部内容,更多相关html页面上下布局内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(118)

评论列表共有 0 条评论

立即
投稿
返回
顶部