分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 软件开发

HTML学习笔记 div布局及table布局案例 第三节 (原创)参考使用表

发布时间:2023-09-06 01:10责任编辑:沈小雨关键词:HTMLdiv
<!DOCTYPE html><html lang="en"><head> ???<meta charset="UTF-8"> ???<title>table布局</title></head><body marginheight="0px" marginwidth="0px"><table width="100%" height="950px" style="background-color: aqua"> ???<tr> ???????<td colspan="2" width="100%" height="10%" style="background-color: #9e5ea5" align="center">这是头部</td> ???</tr> ???<tr> ???????<td width="30" height="80%" style="background-color:blue" align="center">左菜单</td> ???????<td width="70" height="80%" style="background-color:blueviolet" align="center">右菜单</td> ???</tr> ???<tr> ???????<td colspan="2" width="100" height="10%" style="background-color:darkcyan">底部</td> ???</tr></table></body></html>
按 Ctrl+C 复制代码按 Ctrl+C 复制代码 <!DOCTYPE html><html lang="en"><head> ???<meta charset="UTF-8"> ???<title>div控制</title> ???<style> ???????div { ???????????border: 1px solid red; ???????????width: 400px; ???????????height: 150px; ???????????font-size: 35px; ???????} ???????.temple2 { ???????????/*隐藏超出的区域*/ ???????????overflow: hidden; ???????} ???????.temple3 { ???????????/*显示滚动条*/ ???????????overflow: scroll; ???????} ???????.temple4 { ???????????/*自动设置是否显示滚动条*/ ???????????overflow: auto; ???????} ???</style></head><body><div class="temple"> ???床前明月光,<br/> ???肚子饿得慌。<br/> ???举头望腊肉,<br/> ???低头闻香肠。</div><br/><br/><br/><br/><br/><br/><div class="temple2"> ???床前明月光,<br/> ???肚子饿得慌。<br/> ???举头望腊肉,<br/> ???低头闻香肠。</div><br/><br/><br/><br/><br/><br/><div class="temple3"> ???床前明月光,<br/> ???肚子饿得慌。<br/> ???举头望腊肉,<br/> ???低头闻香肠。</div><br/><br/><br/><br/><br/><br/><div class="temple4"> ???床前明月光,<br/> ???肚子饿得慌。<br/> ???举头望腊肉,<br/> ???低头闻香肠。</div></body></html>
按 Ctrl+C 复制代码按 Ctrl+C 复制代码 <!DOCTYPE html><html lang="en"><head> ???<meta charset="UTF-8"> ???<title>div布局</title> ???<style type="text/css"> ???????body { ???????????margin: 0px; ???????} ???????#container { ???????????width: 100%; ???????????height: 950px; ???????????background-color: #9e5ea5; ???????} ???????#heading { ???????????width: 100%; ???????????height: 10%; ???????????background-color: #df89ff; ???????} ???????#content_menu { ???????????width: 30%; ???????????height: 80%; ???????????background-color: #ff309e; ???????????float: left; ???????} ???????#content_body { ???????????width: 70%; ???????????height: 80%; ???????????background-color: #7fffd4; ???????????float: left; ???????} ???????#footing { ???????????width: 100%; ???????????height: 10%; ???????????background-color: cadetblue; ???????????clear: both; ???????} ???</style></head><body><div id="container"> ???<div id="heading"> 头部</div> ???<div id="content_menu"> 内容菜单</div> ???<div id="content_body"> 内容主题</div> ???<div id="footing"> 底部</div></div></body></html>

HTML学习笔记 div布局及table布局案例 第三节 (原创)参考使用表

原文地址:http://www.cnblogs.com/ttzzyy/p/7512978.html

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved