本文主要分享【reboot and select proper boot device】,技术文章【css如何自适应浏览器的高度,div css 高度 宽度 自适应浏览器 屏幕大小】为【weixin_40000301】投稿,如果你遇到相关问题,请看以下文章。
reboot and select proper boot device
DIV布局——IT北瓜原创html,body{
font: 100% 微软雅黑, 宋体, 新宋体;
margin: 0; /* 最好将 body 元素的边距和填充设置为 0 以覆盖不同的浏览器默认值 */
padding: 0;
text-align: center; /* 在 IE 5* 浏览器中,这会将容器居中。文本随后将在 #container 选择器中设置为默认左对齐 */
color: #FFF;
height: 100%; /*这里将高度设置为100%是这个布局实现自适应高度的关键,只有这里设置了高度,下面div的高度设置才起作用*/
background-color: #000;
}
#layout {
width: 100%;
height: 100%;
margin: 0px auto;
}
#header {
height: 13%;
background-color: #09F;
}
#container {
height: 82%;
background-color: #CC3;
}
#container #sidebar {
height: 100%;
width: 20%;
background-color: #C03;
float: left;
}
#container #main {
height: 100%;
width: 80%;
background-color: #CFC;
float: left;
}
#footer {
height: 5%;
background-color: #930;
}
.clearfloat { /* 此类应当放在 div 或 break 元素上,而且该元素应当是完全包含浮动的容器关闭之前的最后一个元素 */
clear:both;
height:0;
font-size: 1px;
line-height: 0px;
}
本文《css如何自适应浏览器的高度,div css 高度 宽度 自适应浏览器 屏幕大小》版权归weixin_40000301所有,引用reboot and select proper boot device需遵循CC 4.0 BY-SA版权协议。
版权声明:本文来源于网络,如有侵权请E-mail联系 ufidawhy 站长 ufidawhy@vip.qq.com!