文件模版

HTML模版指的是团队使用的初始化HTML文件,里面会根据不同平台而采用不一样的设置,一般主要不同的设置就是 mata 标签的设置,以下是 PC 和移动端的 HTML 模版。

HTML5标准模版

  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>HTML5标准模版</title>
  6. </head>
  7. <body>
  8. </body>
  9. </html>

团队约定

移动端

  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no" >
  6. <meta name="format-detection" content="telephone=no" >
  7. <title>移动端HTML模版</title>
  8. <!-- S DNS预解析 -->
  9. <link rel="dns-prefetch" href="">
  10. <!-- E DNS预解析 -->
  11. <!-- S 线上样式页面片,开发请直接取消注释引用 -->
  12. <!-- #include virtual="" -->
  13. <!-- E 线上样式页面片 -->
  14. <!-- S 本地调试,根据开发模式选择调试方式,请开发删除 -->
  15. <link rel="stylesheet" href="css/index.css" >
  16. <!-- /本地调试方式 -->
  17. <link rel="stylesheet" href="http://srcPath/index.css" >
  18. <!-- /开发机调试方式 -->
  19. <!-- E 本地调试 -->
  20. </head>
  21. <body>
  22. </body>
  23. </html>

PC端

  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="keywords" content="your keywords">
  6. <meta name="description" content="your description">
  7. <meta name="author" content="author,email address">
  8. <meta name="robots" content="index,follow">
  9. <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
  10. <meta name="renderer" content="ie-stand">
  11. <title>PC端HTML模版</title>
  12. <!-- S DNS预解析 -->
  13. <link rel="dns-prefetch" href="">
  14. <!-- E DNS预解析 -->
  15. <!-- S 线上样式页面片,开发请直接取消注释引用 -->
  16. <!-- #include virtual="" -->
  17. <!-- E 线上样式页面片 -->
  18. <!-- S 本地调试,根据开发模式选择调试方式,请开发删除 -->
  19. <link rel="stylesheet" href="css/index.css" >
  20. <!-- /本地调试方式 -->
  21. <link rel="stylesheet" href="http://srcPath/index.css" >
  22. <!-- /开发机调试方式 -->
  23. <!-- E 本地调试 -->
  24. </head>
  25. <body>
  26. </body>
  27. </html>