html5 div布局与table布局
来源:互联网 发布:公众号矩阵 编辑:程序博客网 时间:2024/06/06 03:08
div布局:html+css实现简单布局。
#container中height不能写成百分数,必须为具体高度。
<!DOCTYPE html><html><head lang="en"> <meta charset="UTF-8"> <title>div布局</title> <style type="text/css"> body{ margin:0; padding:0; } #container{ width:100%; height:650px; background-color: aqua; } #heading{ width:100%; height:10%; background-color: azure; } #content-menu{ width:30%; height:80%; background-color: chartreuse; float:left; } #content-body{ width:70%; height:80%; background-color: chocolate; float:left; } #footer{ width:100%; height:10%; background-color: darkgrey; clear: both; } </style></head><body> <div id="container"> <div id="heading">头部</div> <div id="content-menu">内容菜单</div> <div id="content-body">内容主体</div> <div id="footer">底部</div> </div></body></html>
效果图:
<!DOCTYPE html><html><head lang="en"> <meta charset="UTF-8"> <title>table布局</title></head><body marginwidth="0px" marginheight="0px"> <table width="100%" height="650px" style="background-color: aqua"> <tr> <td colspan="3" width="100%" height="10%" style="background-color: chartreuse">这是头部</td> </tr> <tr> <td width="20%" height="80%" style="background-color: antiquewhite">左菜单</td> <td width="60%" height="80%" style="background-color: coral">内容</td> <td width="20%" height="80%" style="background-color: cornflowerblue">右菜单</td> </tr> <tr> <td colspan="3" width="100%" height="10%" style="background-color: crimson">这是底部</td> </tr> </table></body></html>
效果图:
0 0
- html5 div布局与table布局
- Div布局与Table布局
- HTML5 的div与table的两种布局
- WEB标准:Div布局与Table布局
- DIV布局与TABLE布局对比
- div+css与table布局
- HTML布局----div布局&&table
- DIV与Table两种页面布局
- DIV+CSS布局与table布局的比较 区别
- table布局与DIV+CSS布局的区别
- html5 div 简单布局
- DIV+CSS布局和Table布局对比
- Div+Css布局-----table表格布局
- 像table一样布局div
- div+css实现table布局
- table和div布局优缺点
- DIV与Table布局在大型网站的可用性比较
- DIV与Table布局在大型网站的可用性比较
- mysql实操(一)—使用存储过程模拟实现用户登录
- 微机原理==常用汇编指令(9)
- 第七届 蓝桥杯 5题
- Android自定义水波纹动画Layout
- json的运用比较安全的别人看不懂的写法
- html5 div布局与table布局
- 细说挂载
- 感言哈
- LeetCode 27. Remove Element
- 初学mysql(十一)之细枝末节-数据类型与运算符
- 使用CRecordset update()函数不能更新
- EventBus使用详解
- JavaWeb中的多数据源开发
- hosts文件在哪?什么修改?另附Windows7/8/10 Mac/iPhone原版hosts文件