userlogin.jsp 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362
  1. <%--
  2. Created by IntelliJ IDEA.
  3. User: 86180
  4. Date: 2024/6/1
  5. Time: 7:45
  6. To change this template use File | Settings | File Templates.
  7. --%>
  8. <%@ page contentType="text/html; charset=gb2312"%>
  9. <!DOCTYPE html>
  10. <html lang="en">
  11. <head>
  12. <meta charset="UTF-8">
  13. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  14. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  15. <title>SHIXUN</title>
  16. <!-- 导入字体图标 -->
  17. <link rel="stylesheet" href="./font_mw3z7ts489g/iconfont.css">
  18. <style>
  19. * {
  20. margin: 0;
  21. padding: 0;
  22. box-sizing: border-box;
  23. /* 字体无法选中 */
  24. user-select: none;
  25. }
  26. body {
  27. width: 100%;
  28. height: 100vh;
  29. display: flex;
  30. justify-content: center;
  31. align-items: center;
  32. font-size: 12px;
  33. background-color: #ecf0f3;
  34. color: #a0a5a8;
  35. }
  36. .shell {
  37. position: relative;
  38. width: 1000px;
  39. min-width: 1000px;
  40. min-height: 600px;
  41. height: 600px;
  42. padding: 25px;
  43. background-color: #ecf0f3;
  44. box-shadow: 10px 10px 10px #d1d9e6, -10px -10px 10px #f9f9f9;
  45. border-radius: 12px;
  46. overflow: hidden;
  47. }
  48. /* 设置响应式 */
  49. @media (max-width: 1200px) {
  50. .shell {
  51. transform: scale(0.7);
  52. }
  53. }
  54. @media (max-width: 1000px) {
  55. .shell {
  56. transform: scale(0.6);
  57. }
  58. }
  59. @media (max-width: 800px) {
  60. .shell {
  61. transform: scale(0.5);
  62. }
  63. }
  64. @media (max-width: 600px) {
  65. .shell {
  66. transform: scale(0.4);
  67. }
  68. }
  69. .container {
  70. display: flex;
  71. justify-content: center;
  72. align-items: center;
  73. position: absolute;
  74. top: 0;
  75. width: 600px;
  76. height: 100%;
  77. padding: 25px;
  78. background-color: #ecf0f3;
  79. transition: 1.25s;
  80. }
  81. .form {
  82. display: flex;
  83. justify-content: center;
  84. align-items: center;
  85. flex-direction: column;
  86. width: 100%;
  87. height: 100%;
  88. }
  89. .iconfont {
  90. margin: 0 5px;
  91. border: rgba(0, 0, 0, 0.5) 2px solid;
  92. border-radius: 50%;
  93. font-size: 25px;
  94. padding: 3px;
  95. opacity: 0.5;
  96. transition: 0.1s;
  97. }
  98. .iconfont:hover {
  99. opacity: 1;
  100. transition: 0.15s;
  101. cursor: pointer;
  102. }
  103. .form_input {
  104. width: 350px;
  105. height: 40px;
  106. margin: 4px 0;
  107. padding-left: 25px;
  108. font-size: 13px;
  109. letter-spacing: 0.15px;
  110. border: none;
  111. outline: none;
  112. background-color: #ecf0f3;
  113. transition: 0.25s ease;
  114. border-radius: 8px;
  115. box-shadow: inset 2px 2px 4px #d1d9e6, inset -2px -2px 4px #f9f9f9;
  116. }
  117. .form_input:focus {
  118. box-shadow: inset 4px 4px 4px #d1d9e6, inset -4px -4px 4px #f9f9f9;
  119. }
  120. .form_span {
  121. margin-top: 30px;
  122. margin-bottom: 12px;
  123. }
  124. .form_link {
  125. color: #181818;
  126. font-size: 15px;
  127. margin-top: 25px;
  128. border-bottom: 1px solid #a0a5a8;
  129. line-height: 2;
  130. }
  131. .title {
  132. font-size: 34px;
  133. font-weight: 700;
  134. line-height: 3;
  135. color: #181818;
  136. letter-spacing: 10px;
  137. }
  138. .description {
  139. font-size: 14px;
  140. letter-spacing: 0.25px;
  141. text-align: center;
  142. line-height: 1.6;
  143. }
  144. .button {
  145. width: 180px;
  146. height: 50px;
  147. border-radius: 25px;
  148. margin-top: 50px;
  149. font-weight: 700;
  150. font-size: 14px;
  151. letter-spacing: 1.15px;
  152. background-color: #4B70E2;
  153. color: #f9f9f9;
  154. box-shadow: 8px 8px 16px #d1d9e6, -8px -8px 16px #f9f9f9;
  155. border: none;
  156. outline: none;
  157. }
  158. .a-container {
  159. z-index: 100;
  160. left: calc(100% - 600px);
  161. }
  162. .b-container {
  163. left: calc(100% - 600px);
  164. z-index: 0;
  165. }
  166. .switch {
  167. display: flex;
  168. justify-content: center;
  169. align-items: center;
  170. position: absolute;
  171. top: 0;
  172. left: 0;
  173. height: 100%;
  174. width: 400px;
  175. padding: 50px;
  176. z-index: 200;
  177. transition: 1.25s;
  178. background-color: #ecf0f3;
  179. overflow: hidden;
  180. box-shadow: 4px 4px 10px #d1d9e6, -4px -4px 10px #d1d9e6;
  181. }
  182. .switch_circle {
  183. position: absolute;
  184. width: 500px;
  185. height: 500px;
  186. border-radius: 50%;
  187. background-color: #ecf0f3;
  188. box-shadow: inset 8px 8px 12px #b8bec7, inset -8px -8px 12px #fff;
  189. bottom: -60%;
  190. left: -60%;
  191. transition: 1.25s;
  192. }
  193. .switch_circle-t {
  194. top: -30%;
  195. left: 60%;
  196. width: 300px;
  197. height: 300px;
  198. }
  199. .switch_container {
  200. display: flex;
  201. justify-content: center;
  202. align-items: center;
  203. flex-direction: column;
  204. position: absolute;
  205. width: 400px;
  206. padding: 50px 55px;
  207. transition: 1.25s;
  208. }
  209. .switch_button {
  210. cursor: pointer;
  211. }
  212. .switch_button:hover,
  213. .submit:hover {
  214. box-shadow: 6px 6px 10px #d1d9e6, -6px -6px 10px #f9f9f9;
  215. transform: scale(0.985);
  216. transition: 0.25s;
  217. }
  218. .switch_button:active,
  219. .switch_button:focus {
  220. box-shadow: 2px 2px 6px #d1d9e6, -2px -2px 6px #f9f9f9;
  221. transform: scale(0.97);
  222. transition: 0.25s;
  223. }
  224. .is-txr {
  225. left: calc(100% - 400px);
  226. transition: 1.25s;
  227. transform-origin: left;
  228. }
  229. .is-txl {
  230. left: 0;
  231. transition: 1.25s;
  232. transform-origin: right;
  233. }
  234. .is-z {
  235. z-index: 200;
  236. transition: 1.25s;
  237. }
  238. .is-hidden {
  239. visibility: hidden;
  240. opacity: 0;
  241. position: absolute;
  242. transition: 1.25s;
  243. }
  244. @keyframes is-gx {
  245. 0%,
  246. 10%,
  247. 100% {
  248. width: 400px;
  249. }
  250. 30%,
  251. 50% {
  252. width: 500px;
  253. }
  254. }
  255. .yanzheng{
  256. display: flex;
  257. }
  258. </style>
  259. </head>
  260. <body>
  261. <div class="shell">
  262. <div class="container b-container" id="b-container">
  263. <form action="LoginServlet" method="post" class="form" id="b-form">
  264. <h2 class="form_title title">Login</h2>
  265. <div class="form_icons">
  266. </div>
  267. <span class="form_span">Log in</span>
  268. <input type="text" class="form_input" placeholder="Email" name="email">
  269. <input type="text" class="form_input" placeholder="Password" name="pwd">
  270. <div class="yanzheng">
  271. <input type="text" class="form_input" placeholder="PIN" name="img">
  272. </div>
  273. <img src="VerifyCodeServlet" id="ifh">
  274. <input type="button" value="看不清? 换一张." id="btn" style="margin-top: 4px">
  275. <br>
  276. <button class="form_button button submit">SIGN IN</button>
  277. </form>
  278. </div>
  279. <div class="switch" id="switch-cnt">
  280. <div class="switch_circle"></div>
  281. <div class="switch_circle switch_circle-t"></div>
  282. <div class="switch_container" id="bb">
  283. <h2 class="switch_title title" style="letter-spacing: 0;">Welcome To user system</h2>
  284. <p class="switch_description description">Ready set?Let's Go!</p>
  285. <button class="form_button button submit" onclick="location.href='user-register.jsp'">SIGN UP</button>
  286. </div>
  287. </div>
  288. </div>
  289. <script type="text/javascript">
  290. document.getElementById("ifh").onclick = function () {
  291. // 获取img元素
  292. // 为了让浏览器发送请求到servlet, 所以一定要改变src
  293. document.getElementsByTagName("img")[0].src =
  294. "VerifyCodeServlet?time=" + new Date().getTime();
  295. };
  296. document.getElementById("btn").onclick = function () {
  297. // 获取img元素
  298. // 为了让浏览器发送请求到servlet, 所以一定要改变src
  299. document.getElementsByTagName("img")[0].src =
  300. "VerifyCodeServlet?time=" + new Date().getTime();
  301. };
  302. </script>
  303. </body>
  304. <%--<%--%>
  305. <%-- // 获取浏览器发送过来的cookie, 获取用户信息--%>
  306. <%-- Cookie[] cookies = request.getCookies();--%>
  307. <%-- String email = "";--%>
  308. <%-- if (cookies != null) {--%>
  309. <%-- for (Cookie cookie : cookies) {--%>
  310. <%-- if ("email".equals(cookie.getName())) {--%>
  311. <%-- email = cookie.getValue();--%>
  312. <%-- }--%>
  313. <%-- }--%>
  314. <%-- }--%>
  315. <%--%>--%>
  316. </html>