Blogger Information
Blog 15
fans 0
comment 0
visits 6246
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
提交界面和iframe后台管理界面
啊℃。㏄
Original
475 people have browsed it

提交界面

  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. </head>
  8. <body>
  9. <!-- placeholder:提示信息 -->
  10. <form action="" method="post">
  11. <div>
  12. <!-- label.for值必须和input.id值一致 -->
  13. <label for="username">账号:</label>
  14. <!-- type,name,value -->
  15. <!-- autofocus:自动获取焦点,required:不能为空值 -->
  16. <input type="text" name="username" id="username" value="" placeholder="至少8位" autofocus required >
  17. </div>
  18. <div>
  19. <label for="pwd">密码:</label>
  20. <input type="password" name="pwd" id="pwd" placeholder="数字+字母" required >
  21. </div>
  22. <div>
  23. <label for="my-email">邮箱:</label>
  24. <input type="email" name="my-email" id="my-email" placeholder="@email.com" required>
  25. </div>
  26. <!-- 单选按钮 -->
  27. <div>
  28. <label for="male">性别:</label>
  29. <!-- checked:默认值 , 所有的input.name都必须相同 -->
  30. <input type="radio" name="gender" id="gender" checked><label for="male" ></label>
  31. <input type="radio" name="gender" id="gender" ><label for="female"></label>
  32. </div>
  33. <!-- 复选框 -->
  34. <div>
  35. <label for="1">爱好:</label>
  36. <!-- 所有的input.name必须是一个数组格式 -->
  37. <input type="checkbox" name="hobbies[]" id="lanqiu"><label for="">蓝球</label>
  38. <input type="checkbox" name="hobbies[]" id="sheying" checked><label for="">摄影</label>
  39. <input type="checkbox" name="hobbies[]" id="youxi" checked><label for="">游戏</label>
  40. <input type="checkbox" name="hobbies[]" id="yumaoqiu"><label for="">羽毛球</label>
  41. </div>
  42. <!-- 下拉列表 -->
  43. <!-- select.name,option.value,name,value属性不能再同一标签中 -->
  44. <!-- selected:默认值 -->
  45. <label for="user">跑步:</label>
  46. <select name="" id="user">
  47. <option value="1">第一名</option>
  48. <option value="2">第二名</option>
  49. <option value="3">第三名</option>
  50. </select>
  51. <div>
  52. <button>提交</button>
  53. </div>
  54. </form>
  55. </body>
  56. </html>

iframe后台框架

  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. *{
  10. margin: 0;
  11. padding: 0;
  12. }
  13. /* 头部 */
  14. .header{
  15. position: relative;
  16. width: 100%;
  17. height: 120px;
  18. border-bottom: 1px solid rgb(13, 13, 14);
  19. }
  20. .header h1{
  21. width: 100%;
  22. height: 50px;
  23. display: inline-block;
  24. text-align: center;
  25. }
  26. .header div.left{
  27. float: right;
  28. }
  29. /* 左侧导航 */
  30. .hang{
  31. width: 50px;height: 0px;
  32. margin: 0;
  33. }
  34. ul{
  35. display: block;
  36. width: 130px;
  37. height: 100px;
  38. text-align: center;
  39. line-height:100px ;
  40. }
  41. ul a{
  42. list-style-type: none;
  43. text-decoration: none;
  44. }
  45. /* 右侧内容 */
  46. iframe{
  47. float: right;
  48. width: 90%;
  49. height: 800px;
  50. }
  51. </style>
  52. </head>
  53. <body>
  54. <!-- 头部 -->
  55. <div class="header">
  56. <h1>后台管理</h1>
  57. <div class="left">
  58. <span>admin</span>
  59. <a href="">退出</a>
  60. </div>
  61. </div>
  62. <!-- 左侧导航 -->
  63. <div class="hang">
  64. <ul>
  65. <li><a href="demo1.html" target="ifreme-my">菜单1</a></li>
  66. <li><a href="demo2.html" target="ifreme-my">菜单2</a></li>
  67. <li><a href="demo1.html" target="ifreme-my">菜单3</a></li>
  68. </ul>
  69. </div>
  70. <div class="rigth">
  71. <iframe src="" frameborder="1" name="ifreme-my"></iframe>
  72. </div>
  73. </body>
  74. </html>

样式来源与优先级

来源1 默认样式

  1. <body>
  2. <!-- 来源1:默认样式/浏览器样式/代理样式 -->
  3. <h1>PHP中文网</h1>
  4. <!-- 备注:浏览器的默认设置是什么,显示出来的颜色,字体等,都是相同的 -->

来源2 自定义样式(行内样式,style属性)

  1. <!-- 来源2:自定义样式,会覆盖默认样式 -->
  2. <h1 style="color: red;">PHP中文网</h1>

来源2.1 自定义样式(文档样式/内部样式 style标签)

  1. <h1 >php中文网</h1>
  2. <h1 >php中文网</h1>
  3. <style>
  4. /* 分两步:
  5. 1.找到他:选择器
  6. 2.设置他:样式声明 */
  7. h1{
  8. color:rgb(29, 18, 18);
  9. }
  10. </style>

来源2.2 自定义样式(外部样式,css文档)

  1. <!-- 1.第一种 -->
  2. <link rel="stylesheet" href="static/style.css">
  3. <!-- 2.第二种 -->
  4. <style>
  5. @import url(static/style.css);
  6. </style>

来源3 书写顺序(优先级)写在后面的同名属性会覆盖前面的(优先级相同的情况下)


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