H5页面基础元素
H5页面结构元素示例
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="style.css">
<title>h5结构</title>
</head>
<body>
<header>
<h1>网页标题</h1>
<h2>次级标题</h2>
<h4>提示信息</h4>
</header>
<div id="container">
<nav>
<h3>导航</h3>
<a href="#">链接1</a>
<a href="#">链接2</a>
<a href="#">链接3</a>
</nav>
<section>
<article>
<header>
<h1>文章标题</h1>
</header>
<p>文章内容。。。</p>
<footer>
<h2>文章注脚</h2>
</footer>
</article>
</section>
<aside>
<h3>相关内容</h3>
<p>相关辅助信息或者服务...</p>
</aside>
<footer>
<h2>页脚</h2>
</footer>
</div>
</body>
</html>
style.css
```
body {
background-color: #CCCCCC;
font-family: Geneva, Arial, Helvetica, sans-serif;
margin: 0px auto;
max-width: 900px;
border: solid;
border-color: #FFFFFF;
}
header {
background-color: #F47D31;
display: block;
color: #FFFFFF;
text-align: center;
}
header h2 {
margin: 0px;
color: #FFFFFF;
}
h1 {
font-size: 72px;
margin: 0px;
}
h2 {
font-size: 24px;
margin: 0px;
text-align: center;
color: #F47D31;
}
h3 {
font-size: 18px;
margin: 0px;
text-align: center;
color: #F47D31;
}
h4 {
color: #F47D31;
background-color: #fff;
-webkit-box-shadow: 2px 2px 20px #888;
-webkit-transform: rotate(-45deg);
-moz-box-shadow: 2px 2px 20px #888;
-moz-transform: rotate(-45deg);
position: absolute;
padding: 0px 150px;
top: 50px;
left: -120px;
text-align: center;
}
nav {
display: block;
width: 25%;
float: left;
}
nav a:link,
nav a:visited {
display: block;
border-bottom: 3px solid #fff;
padding: 10px;
text-decoration: none;
font-weight: bold;
margin: 5px;
}
nav a:hover {
color: white;
background-color: #F47D31;
}
nav h3 {
margin: 15px;
color: white;
}
container {
background-color: #888;
}
section {
display: block;
width: 50%;
float: left;
}
article {
background-color: #eee;
display: block;
margin: 10px;
padding: 10px;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
-webkit-box-shadow: 2px 2px 20px #888;
-webkit-transform: rotate(-10deg);
-moz-box-shadow: 2px 2px 20px #888;
-moz-transform: rotate(-10deg);
}
article header {
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
padding: 5px;
}
article footer {
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
padding: 5px;
}
article h1 {
font-size: 18px;
}
aside {
display: block;
width: 25%;
float: left;
}
aside h3 {
margin: 15px;
color: white;
}
aside p {
margin: 15px;
color: white;
font-weight: bold;
font-style: italic;
}
footer {
clear: both;
display: block;
background-color: #F47D31;
color: #FFFFFF;
text-align: center;
padding: 15px;
}
footer h2 {
font-size: 14px;
color: white;
}
/* links */
a {
color: #F47D31;
}
a:hover {
text-decoration: underline;
}
![](https://img2018.cnblogs.com/blog/740100/201904/740100-20190427221924891-1541389230.jpg)
最新文章
- 从零开始学Python第六周:面向对象基础(需修改)
- ASP.NET连接数据库时,提示“用户 &#39;sa&#39; 登录失败原因: 未与信任 SQL Server 连接相关联
- Swift中共有74个内建函数
- 【HDOJ】2896 病毒侵袭
- 限制div高度当内容多了溢出时显示滚动条
- one command 一键收集 oracle 巡检信息(包括dbhc,awr reports)
- 004串重量 (keep it up)
- php命名空间如何引入一个变量类名?
- python的with语句,超级强大
- 第四章 go语言 数组、切片和映射
- springMVC源码解析--HandlerMethodArgumentResolverComposite参数解析器集合(二)
- 报文分析4、TCP协议的头结构
- 解决IDEA无法安装插件的问题
- Lodop不要把客户端的打印机共享到服务器上 再在客户端打印
- HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\aspnet_state\Parameters\AllowRemoteConnection
- js关于弹也遮罩层
- Chrome 强制刷新缓存的方法
- python open 追加
- [DP题]最长上升子序列
- VIO概述 On-Manifold Preintegration for Real-Time Visual--Inertial Odometry
热门文章
- Redis 使用过程中遇到的具体问题
- 操作Excel模块openpyxl
- 201871010131-张兴盼《面向对象程序设计(java)》第十一周学习总结
- python27期day13:闭包、装饰器初始、标准版装饰器、作业题
- 文件上传-pubsec-文件上传大小限制
- MDK快速定位硬件异常位置方法(移植SEGGER_HardFaultHandler库),调用show caller code即可快速锁定(参考硬汉哥)
- vue-quill-editor富文本编辑器,添加了汉化样式却汉化不了
- 基于CAS实现无锁结构
- [LeetCode] 37. Sudoku Solver 求解数独
- Apollo:微服务架构下的配置管理