码迷,mamicode.com
首页 > Web开发 > 详细

HTML5 结构元素

时间:2018-12-06 01:33:31      阅读:259      评论:0      收藏:0      [点我收藏+]

标签:nsf   之间   界面   visit   font   hit   链接   定义   spl   

Html

  1. <!DOCTYPE?html>??
  2. <html>??
  3. ????<head>??
  4. ????????<meta?charset="utf-8"><!--?声明编码格式?-->??
  5. ????????<title>HTML5?结构元素</title><!--?标题?-->??
  6. ????????<link?rel="stylesheet"?href="html5.css"/><!--?link?引入样式表??rel?规定当前文档与被链接文档之间的关系。?href?规定被链接文档的位置。?-->??
  7. ????</head>??
  8. ????<body>??
  9. ????????<header><!--?标记头部区域的内容,用于整个界面或者界面中的某个区域?-->??
  10. ????????????<h1>网页标题</h1>??
  11. ????????????<h2>次级标题</h2>??
  12. ????????????<h4>提示信息</h4>??
  13. ????????</header>??
  14. ????????<div?id=‘container‘>??
  15. ????????????<nav><!--?导航类辅助内容?-->??
  16. ????????????????<h3>导航</h3>??
  17. ????????????????<a?href="#">链接1</a>??
  18. ????????????????<a?href="#">链接2</a>??
  19. ????????????????<a?href="#">链接3</a>??
  20. ????????????</nav>??
  21. ????????????<section><!--?标签定义文档中的节(section、区段)。比如章节、页眉、页脚或文档中的其他部分。?-->??
  22. ????????????????<article><!--?标签定义外部的内容。?-->??
  23. ????????????????????<header>??
  24. ????????????????????????<h1>文章标题</h1>??
  25. ????????????????????</header>??
  26. ????????????????????<p>文章内容。。。。。</p>??
  27. ????????????????????<footer><!--?标签定义文档或节的页脚。?-->??
  28. ????????????????????????<h2>文章的注脚</h2>??
  29. ????????????????????</footer>??
  30. ????????????????</article>??
  31. ????????????</section>??
  32. ????????????<aside><!--?相关内容或者引文?-->??
  33. ????????????????<h3>相关内容</h3>??
  34. ????????????????<p>相关辅助信息或者服务。。。。</p>??
  35. ????????????</aside>??
  36. ????????????<footer><!--?标记脚部区域的内容?-->??
  37. ????????????????<h2>页脚</h2>??
  38. ????????????</footer>??
  39. ????????</div>??
  40. ????</body>??
  41. </html>??

Css

  1. body?{?background-color:#CCCCCC;?font-family:Geneva,?Arial,?Helvetica,?sans-serif;?margin:?0px?auto;?max-width:900px;?border:solid;?border-color:#FFFFFF;?}??
  2. header?{?background-color:?#F47D31;?display:block;?color:#FFFFFF;?text-align:center;?}??
  3. header?h2?{?margin:?0px;?}??
  4. h1?{?font-size:?72px;?margin:?0px;?}??
  5. h2?{?font-size:?24px;?margin:?0px;?text-align:center;?color:?#F47D31;?}??
  6. h3?{?font-size:?18px;?margin:?0px;?text-align:center;?color:?#F47D31;?}??
  7. 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;?}??
  8. nav?{?display:block;?width:25%;?float:left;?}??
  9. nav?a:link,?nav?a:visited?{?display:?block;?border-bottom:?3px?solid?#fff;?padding:?10px;?text-decoration:?none;?font-weight:?bold;?margin:?5px;?}??
  10. nav?a:hover?{?color:?white;?background-color:?#F47D31;?}??
  11. nav?h3?{?margin:?15px;?color:?white;?}??
  12. #container?{?background-color:?#888;?}??
  13. section?{?display:block;?width:50%;?float:left;?}??
  14. 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);?}??
  15. article?header?{?-webkit-border-radius:?10px;?-moz-border-radius:?10px;?border-radius:?10px;?padding:?5px;?}??
  16. article?footer?{?-webkit-border-radius:?10px;?-moz-border-radius:?10px;?border-radius:?10px;?padding:?5px;?}??
  17. article?h1?{?font-size:?18px;?}??
  18. aside?{?display:block;?width:25%;?float:left;?}??
  19. aside?h3?{?margin:?15px;?color:?white;?}??
  20. aside?p?{?margin:?15px;?color:?white;?font-weight:?bold;?font-style:?italic;?}??
  21. footer?{?clear:?both;?display:?block;?background-color:?#F47D31;?color:#FFFFFF;?text-align:center;?padding:?15px;?}??
  22. footer?h2?{?font-size:?14px;?color:?white;?}??
  23. /*?links?*/??
  24. a?{?color:?#F47D31;?}??
  25. a:hover?{?text-decoration:?underline;?}??

HTML5 结构元素

标签:nsf   之间   界面   visit   font   hit   链接   定义   spl   

原文地址:https://www.cnblogs.com/songdongdong6/p/10074226.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!