Blogger Information
Blog 3
fans 0
comment 1
visits 1773
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
表单与css
手机用户1601922620
Original
429 people have browsed it

由于过于生疏还不太理解,写的不好,请老师谅解!

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>表单css</title>
  7. <style>
  8. /* 样式初始化 reset.css */
  9. * {
  10. margin: 0;
  11. padding: 0;
  12. box-sizing: border-box;
  13. }
  14. a {
  15. color: #555;
  16. text-decoration: none;
  17. }
  18. /* 基本选择器 */
  19. body{
  20. background-color: rgb(0, 162, 255);
  21. }
  22. /* 上下文选择器 */
  23. em + li {
  24. background-color: blueviolet;
  25. }
  26. </style>
  27. </head>
  28. <body>
  29. <!-- 标题 -->
  30. <h3 align="center">用户登陆</h3>
  31. <form action="">
  32. <!-- 表单分组 -->
  33. <fieldset align="center" >
  34. <ul>
  35. <li>
  36. <div>
  37. <div>
  38. <label for="username">帐号:</label>
  39. <input
  40. type="text"
  41. id="username"
  42. name="username"
  43. autofocus
  44. required
  45. placeholder="登陆账户"
  46. value="username"
  47. />
  48. </div>
  49. </div>
  50. </li>
  51. <li>
  52. <div>
  53. <label for="psw">密码:</label>
  54. <input type="password" id="psw" name="psw" required placeholder="不少于6位" />
  55. <!-- <button type="button" onclick="document.querySelector('#psw').type='text'">显示密码</button> -->
  56. </div>
  57. </li>
  58. <li class="em">
  59. <div>
  60. <div>
  61. <label for="email">邮箱:</label>
  62. <input type="email" id="email" name="email" required placeholder="deml@email.com" class="em"/>
  63. </div>
  64. </div>
  65. </li>
  66. <li >
  67. <button>登陆</button>
  68. </li>
  69. </ul>
  70. </fieldset>
  71. </form>
  72. </body>
  73. </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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!