当前第2页 返回上一页
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="css/mystyle.css">
<title>Island estaurant</title>
</head>
<body>
<table id="container">
<tr>
<td id="header" colspan="2">
<h1>点菜系统</h1>
</td>
</tr>
<tr>
<td id="menu">
<b>菜品</b><br>
<div id="dishes">
小鸡炖蘑菇<br>
家常豆腐<br>
酸辣土豆丝<br>
</div>
</td>
<td id="content">
小鸡炖蘑菇:<br>
幼鸡一只
</td>
</tr>
<tr>
<td id="footer" colspan="2">世俗孤岛的餐厅</td>
</tr>
</table>
</body>
</html>
CSS 文件
/*整个点餐系统的界面*/
#container
{
width: 600px;
margin: 100px;
/*取消单元格边框之间的边距*/
border-spacing: 0;
}
/*点餐系统界面的头部*/
#header
{
background-color: red;
text-align: center;
}
h1
{
margin-bottom: 0px;
}
/*点餐系统界面的菜单*/
#menu
{
background-color: #FFD700;
height: 200px;
width: 150px;
}
#dishes
{
padding-top: 10px;
padding-left: 10px;
line-height: 20px;
}
/*点餐系统界面的菜品详情*/
#content
{
background-color: gray;
height: 200px;
width: 450px;
}
/*点餐系统界面的尾部*/
#footer
{
background-color: blue;
height: 25px;
text-align: center;
}
|
相信看了这些案例你已经掌握了方法,更多精彩请关注php中文网其它相关文章!
相关阅读:
怎样让移动端的网页内容自适应
table表格中的内容溢出应该如何处理
在HTML中iframe与frame有哪些区别
以上就是HTML的表格应该怎样布局的详细内容,更多文章请关注木庄网络博客!
返回前面的内容
相关阅读 >>
Html i是什么标签?Html i标签的使用方法总结
学习中值得了解Html网页的基本结构(总结)
Html怎么让段落文本两端对齐
Html列表的种类
Html中空格怎么打
有关Html的正确描述
Html中的短语标签是什么?有哪些?
Html如何调用外部jquery
Html5与Html的区别有哪些
Html form标签怎么用
更多相关阅读请进入《Html》频道 >>
人民邮电出版社
本书对 Vue.js 3 技术细节的分析非常可靠,对于需要深入理解 Vue.js 3 的用户会有很大的帮助。——尤雨溪,Vue.js作者
转载请注明出处:木庄网络博客 » HTML的表格应该怎样布局