Blogger Information
Blog 14
fans 0
comment 0
visits 8286
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
Ement常用语法使用学习记录
#三生
Original
425 people have browsed it

1. 实例演示Ement常用语法

使用HTML:5 或直接使用

  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  7. <title>Document</title>
  8. </head>
  9. </html>

div>ui>li 套嵌关系

  1. <div>
  2. <ui>
  3. <li></li>
  4. </ui>
  5. </div>

div+sap+i 兄弟关系

  1. <div></div>
  2. <sap></sap>
  3. <i></i>

div{文本} 文本方式

  1. <div>文本</div>

div*5 重复方法

  1. <div></div>
  2. <div></div>
  3. <div></div>
  4. <div></div>
  5. <div></div>

div+(div>ul>li)+div 组合方法

  1. <div></div>
  2. <div>
  3. <ul>
  4. <li></li>
  5. </ul>
  6. </div>
  7. <div></div>

2. 实例演示元素四类属性

class 和 id 的使用

div.header 生成

  1. <div class="header"></div>

div#header 生成

  1. <div id="header"></div>

a href属性 生成

  1. <a href="http://a"></a>

3. 实例演示布局标签,并分析div+class与 html5语义化标签的优缺点

  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  7. <title>Document</title>
  8. </head>
  9. <body>
  10. <!-- 当前语法使用 .top-header>div.top-hover-menu*3>a{顶部$}-->
  11. <div class="top-header">
  12. <div class="top-hover-menu"><a href="">顶部1</a></div>
  13. <div class="top-hover-menu"><a href="">顶部2</a></div>
  14. <div class="top-hover-menu"><a href="">顶部3</a></div>
  15. </div>
  16. <!-- 当前语法使用 div.left-nav>ui.Nav_menu>li#id.active*6>p{左侧菜单$} -->
  17. <div class="left-nav">
  18. <ui class="Nav_menu">
  19. <li id="id" class="active">
  20. <p>左侧菜单1</p>
  21. </li>
  22. <li id="id" class="active">
  23. <p>左侧菜单2</p>
  24. </li>
  25. <li id="id" class="active">
  26. <p>左侧菜单3</p>
  27. </li>
  28. <li id="id" class="active">
  29. <p>左侧菜单4</p>
  30. </li>
  31. <li id="id" class="active">
  32. <p>左侧菜单5</p>
  33. </li>
  34. <li id="id" class="active">
  35. <p>左侧菜单6</p>
  36. </li>
  37. </ui>
  38. </div>
  39. <!-- 当前语法使用 div.center>(div.search>div{搜索})+div.main>(div.item>div>p{内容$})*3 -->
  40. <div class="center">
  41. <div class="search">
  42. <div>搜索</div>
  43. </div>
  44. <div class="main">
  45. <div class="item">
  46. <div>
  47. <p>内容1</p>
  48. </div>
  49. </div>
  50. <div class="item">
  51. <div>
  52. <p>内容2</p>
  53. </div>
  54. </div>
  55. <div class="item">
  56. <div>
  57. <p>内容3</p>
  58. </div>
  59. </div>
  60. </div>
  61. </div>
  62. <!-- 当前语法使用 div.footer>ui>li*5{底部} -->
  63. <div class="footer">
  64. <ui>
  65. <li>底部</li>
  66. <li>底部</li>
  67. <li>底部</li>
  68. <li>底部</li>
  69. <li>底部</li>
  70. </ui>
  71. </div>
  72. </body>
  73. </html>

总结:HTML5语义化标签结构清晰、阅读简单

Correcting teacher:autoloadautoload

Correction status:qualified

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post