ASCII码 ASCII码

模态框代码及实例图片

发布于:2022-04-01 10:59:25  栏目:技术文档

模态框代码及实例图片

  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>模态框</title>
  8. <style>
  9. @import 'modal1.css';
  10. </style>
  11. </head>
  12. <body>
  13. <div class="header">
  14. <h2>我的博客</h2>
  15. <button onclick="showModal()">登陆</button>
  16. </div>
  17. <div class="modal">
  18. <div class="modal-bg" onclick="closeModal()">
  19. </div>
  20. <form action="" class="modal-form">
  21. <fieldset>
  22. <legend>登陆</legend>
  23. <input type="username" name="username" placeholder="请输入用户名">
  24. <input type="password" name="psd" placeholder="请输入密码">
  25. <button>登陆</button>
  26. </fieldset>
  27. </form>
  28. </div>
  29. <script src="modal1.js"></script>
  30. </body>
  31. </html>

实例显示图片

相关推荐
阅读 +