Blogger Information
Blog 3
fans 0
comment 0
visits 874
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
Emmet插件 & HTML表单
P粉211418575
Original
226 people have browsed it

Emmet插件 & HTML表单

1. Emmet 语法

Emmet: 快速编写 html 文档的神器(VSCode 内置插件)

用法:

  • 指令 + Tab
  • 指令之间不能空格
  • 语法借鉴了 CSS 选择器
  1. 结构: !
  2. 内容:{text}
  3. 属性:[attr],#id,.class
  4. 重复: *
  5. 父子: >
  6. 兄弟: +
  7. 父级: ^
  8. 分组: (emmet)
  9. 序号: $,$@,$@-n

2. 表单

  1. <!DOCTYPE html>
  2. <html lang="en">
  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. <form action="" method="post"></form>
  11. <fieldset style="display: inline-grid; gap: 1em">
  12. <div class="username">
  13. <label for="uname">用户名:</label>
  14. <input type="text" id="uname" name="uname" value="" placeholder="please input your name" autofocus required />
  15. </div>
  16. <div class="email">
  17. <label for="email">email:</label>
  18. <input type="email" name="email" id="email" placeholder="xxx@email.com" />
  19. </div>
  20. <div class="paw">
  21. <lable>密码:</lable>
  22. <input type="password" name="" id="" />
  23. </div>
  24. <div>
  25. <label for="">学号:</label>
  26. <input type="number" name="" id="">
  27. </div>
  28. <div>
  29. <!-- 注意时间 一定要8位 1982-01-01 -->
  30. <label for="">出生年月日:</label>
  31. <input type="date" name="" id="">
  32. </div>
  33. <div>
  34. <label for="">性别:</label>
  35. <input type="radio" name="sex" id="male" value="male" checked /><label for="male"></label>
  36. <input type="radio" name="sex" id="fmale" value="fmale" /><label for="fmale"></label>
  37. <!-- 复选框的情况下 name不可以相同,否则只会想radio 值会被覆盖只返回一个值 -->
  38. </div>
  39. <div class="hobby">
  40. <label for="">爱好:</label>
  41. <input type="checkbox" name="hobby[]" id="shoot" value="shoot" /><label for="shoot">摄影</label>
  42. <input type="checkbox" name="hobby[]" id="game" value="game" /><label for="game">游戏</label>
  43. </div>
  44. <div class="edu">
  45. <label for="">学历:</label>
  46. <select name="" id="">
  47. <option value="" selected disabled>please select</option>
  48. <option value="1">幼儿园</option>
  49. <option value="2">小学</option>
  50. <option value="3">初中</option>
  51. </select>
  52. </div>
  53. <button>提交</button>
  54. </fieldset>
  55. </body>
  56. </html>
Correcting teacher:PHPzPHPz

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