HTML5 - 简单的上下布局页面样例
2016-03-17 13:13
836 查看
1,下面是一个简单的上下布局样例:
2,代码如下
可以看到页面里使用了HTML5的语义元素:< header >、< footer >、< article >
— index.html —
— hangge.css —
原文:HTML5 - 简单的上下布局页面样例
2,代码如下
可以看到页面里使用了HTML5的语义元素:< header >、< footer >、< article >
— index.html —
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>上中下结构</title> <link rel="stylesheet" href="hangge.css"> </head> <body> <article> <header> <h1>欢迎来到hangge.com</h1> <p class="Teaser">航歌 - 做最好的开发者知识平台</h2> <p class="Byline">by hangge.com</p> </header> <div class="Content"> <p>前面讲了如何让程序申请后台短时运行。但这个额外延长的时间毕竟有限。</p> <h2>小标题1</h2> <p>前面讲了如何让程序申请后台短时运行。但这个额外延长的时间毕竟有限。</p> <h2>小标题2</h2> <p>前面讲了如何让程序申请后台短时运行。但这个额外延长的时间毕竟有限。</p> </div> </article> <footer> <p class="Disclaimer">hangge.com 版权所有,未经允许不得转载</p> <p> <a href="index.html">关于我们</a> <a href="index.html">联系我们</a> <a href="index.html">帮助</a> </p> <p>Copyright © 2015</p> </footer> </body> </html>
— hangge.css —
article, aside, figure, figcaption, footer, header, hgroup, nav, section, summary { display: block; } body { font-family: "Helvetica","Hiragino Sans GB","Microsoft Yahei", sans-serif; max-width: 700px; } header { background-color: #2D9900; border: thin #336699 solid; padding: 10px; margin: 10px; text-align: center; } header h1 { margin: 0px; color: white; font-size: xx-large; } header h2 { margin: 0px; font-weight: bold; } header .Teaser { font-size: large; font-weight: bold; } header .Byline { font-style: italic; font-size: small; margin: 0px; } .Content { font-size: medium; padding-top: 20px; padding-bottom: 5px; padding-left: 50px; padding-right: 50px; line-height: 120%; } .Content .LeadIn { font-weight: bold; font-size: large; font-variant: small-caps; } .Content h2 { color: #24486C; margin-bottom: 2px; font-size: medium; } .Content p { margin-top: 0px; } footer { text-align: center; font-size: x-small; } footer .Disclaimer { font-style: italic; } footer p { margin: 3px; }
原文:HTML5 - 简单的上下布局页面样例
相关文章推荐
- HTML5 - 用CSS3动画制作场景切换效果(移动,旋转,淡入淡出等)
- HTML5 - 使用polyfill(腻子脚本)填补旧浏览器对html5的支持缺陷
- HTML5 - 各大浏览器对html5的支持情况
- 使用ionic框架的<ion-scroll>进行水平滚动时,导致页面难以上下滑动的解决方案
- 关于html5不支持frameset的解决方法
- 第一次
- html/html5
- html5响应式布局案例
- html5拖放本地资源
- html5拖放
- html5之viewport
- HTML5延迟加载指定文件(google给的代码)
- html5的离线缓存
- HTML5 - 最简单的html5网页格式样例
- html5头部说明
- WordPress自动提取文章第一张图为特色图像
- HTML5 模拟现实物理效果,感受 Web 技术魅力
- HTML5
- h5 canvas 小球移动
- h5 canvas 画图