博客列表 >0318作业

0318作业

zhang
zhang原创
2022年04月11日 21:40:45314浏览

作业内容:

1. 写一个登录表单,要求有邮箱,密码,登录按钮

2. 写一个简单后台架构: <a> + <iframe>

3. 实例演示元素样式来源与优先级

  • 登录示例图 仿七牛云

  • 写一个简单后台架构示例图

登录示例代码:

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>0318登录页面作业</title>
  5. <meta charset="utf-8">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  7. <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
  8. <link rel="stylesheet" type="text/css" href="https://sso.qiniu.com/asserts/css/bootstrap.min.css">
  9. <link rel="stylesheet" type="text/css" href="https://sso.qiniu.com/asserts/css/app.css?13">
  10. <!-- 以下引用的是网站ico图标 -->
  11. <link rel="icon" type="image/x-icon" href="https://sso.qiniu.com/asserts/favicon.ico" />
  12. </head>
  13. <body>
  14. <header
  15. class="navbar navbar-default navbar-static-top"
  16. id="top"
  17. >
  18. <div class="container-fluid">
  19. <div class="navbar-header">
  20. <button
  21. class="collapsed navbar-toggle"
  22. aria-controls="bs-navbar"
  23. aria-expanded="false"
  24. data-target="#navbar"
  25. data-toggle="collapse"
  26. type="button"
  27. >
  28. <span class="sr-only">Toggle navigation</span>
  29. <span class="icon-bar"></span>
  30. <span class="icon-bar"></span>
  31. <span class="icon-bar"></span>
  32. </button>
  33. <a
  34. class="navbar-brand"
  35. href="../"
  36. >
  37. <div
  38. class="brand"
  39. title="七牛云"
  40. ></div>
  41. </a>
  42. </div>
  43. <nav
  44. class="collapse navbar-collapse"
  45. id="navbar"
  46. >
  47. <ul class="nav navbar-nav navbar-right">
  48. <li>
  49. <a
  50. class="btn btn-primary btn-emphasis"
  51. id="nav-signup-btn"
  52. href="#"
  53. >
  54. 立即注册
  55. </a>
  56. </li>
  57. </ul>
  58. </nav>
  59. </div>
  60. </header>
  61. <div id="feedback-entry"></div>
  62. <div id="main">
  63. <div class="container">
  64. <div class="login-container">
  65. <div class="login-aside col-sm-6">
  66. <a
  67. class="login-aside-content"
  68. style="background-image: url(https://img1.baidu.com/it/u=2774261946,3406162344&fm=253&fmt=auto&app=138&f=JPEG?w=954&h=500);"
  69. ></a>
  70. </div>
  71. <div class="col-sm-6 login-main">
  72. <div class="form">
  73. <div class="login-title">
  74. 版权归七牛云所有 仅供参考学习
  75. </div>
  76. <div class="login-sub-title">
  77. php中文网0318登录作业
  78. </div>
  79. <div
  80. id="notice"
  81. style="display: none;"
  82. >
  83. <div
  84. class="alert alert-danger"
  85. style="display: block;"
  86. role="alert"
  87. >
  88. <button
  89. class="close"
  90. id="close_alert"
  91. type="button"
  92. >
  93. <span>&times;</span>
  94. </button>
  95. <div class="message">
  96. </div>
  97. </div>
  98. </div>
  99. <!-- form 创建表单 + action 请求后端的api地址 + method 请求方法 GET/POST -->
  100. <form action="" method="post"></form>
  101. <div class="form-group field-email">
  102. <div class="field-email-input">
  103. <input class="form-control form-input" type="text" id="email"placeholder="邮箱 / 手机号(仅支持中国大陆号码)"autofocus
  104. autocomplete="false" required/>
  105. </div>
  106. <span class="help-block">请输入正确的邮箱或手机号</span>
  107. </div>
  108. <div class="form-group field-userid-select" id="userIdSelDiv" style="display: none;">
  109. <div class="dropdown form-control">
  110. <div class="dropdown-value" data-toggle="dropdown">
  111. <span class="dropdown-content"></span>
  112. <div class="dropdown-arrow"></div>
  113. </div>
  114. <div class="dropdown-menu" id="userIdSel"></div>
  115. </div>
  116. </div>
  117. <div class="form-group field-password">
  118. <div class="field-password-input">
  119. <input class="form-control form-input" id="password" type="password" placeholder="请输入密码" required/></div>
  120. <span class="help-block">密码不能为空</span>
  121. </div>
  122. <div
  123. class="form-group field-captcha captcha-div hide"
  124. id="captcha-div"
  125. >
  126. <div class="input-group">
  127. <div class="input-group-addon">
  128. <img
  129. id="captcha-image"
  130. src=""
  131. alt=""
  132. />
  133. </div>
  134. </div>
  135. </div>
  136. <button class="btn btn-primary btn-emphasis btn-block" id="login-button" type="button">登录</button>
  137. <div class="login-bottom">
  138. <a
  139. class="login-link"
  140. href="#"
  141. >
  142. 立即注册
  143. </a>
  144. <div class="login-link-spacing"></div>
  145. <a
  146. class="login-link"
  147. href="#"
  148. >
  149. 忘记密码
  150. </a>
  151. </div>
  152. </div>
  153. </div>
  154. </div>
  155. </div>
  156. <div class="copyright">© 2022 七牛云 版权所有</div>
  157. </div>
  158. </body>
  159. </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>后台使用iframe实战</title>
  8. <style>
  9. a{
  10. font-size: 20px;
  11. color: brown;
  12. }
  13. </style>
  14. </head>
  15. <body>
  16. <a href="https://j.map.baidu.com/26/BK" target="content" >天安门地图</a>
  17. <iframe src="" frameborder="2" name="content" width="500" height="400"></iframe>
  18. </body>
  19. </html>

css元素优先级示例

  1. /* tag 看作个位
  2. id 看作百位
  3. class 看作十位
  4. 例如
  5. <div class="class" id="id">test</div>
  6. 其中 div为tag class 为十位 id为百位 )*/
  7. /* 如按下计算 */
  8. #id{
  9. }
  10. /* 权重则为 (1,0,0) */
上一条:双色球选项卡实践下一条:0317作业
声明:本文内容转载自脚本之家,由网友自发贡献,版权归原作者所有,如您发现涉嫌抄袭侵权,请联系admin@php.cn 核实处理。
全部评论
文明上网理性发言,请遵守新闻评论服务协议