styles.css 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. body {
  2. font-family: Arial, sans-serif; /* 设置字体风格为Arial,无衬线 */
  3. background: #f4f4f4; /* 设置背景颜色 */
  4. margin: 0;
  5. padding: 0;
  6. display: flex; /* 使用Flexbox布局 */
  7. justify-content: center; /* 水平居中内容 */
  8. align-items: center; /* 垂直居中内容 */
  9. height: 100vh; /* 高度占满视口 */
  10. }
  11. .login-container {
  12. background: white; /* 白色背景 */
  13. padding: 20px; /* 内边距20像素 */
  14. border-radius: 5px; /* 边角圆滑化 */
  15. box-shadow: 0 0 10px rgba(0,0,0,0.1); /* 盒子阴影效果 */
  16. text-align: center; /* 文本居中 */
  17. }
  18. .form-group {
  19. margin-bottom: 15px; /* 底部外边距 */
  20. text-align: left; /* 左对齐文本 */
  21. }
  22. label {
  23. display: block; /* 让标签独占一行 */
  24. margin-bottom: 5px; /* 标签下方外边距 */
  25. }
  26. input[type="text"],
  27. input[type="password"] {
  28. width: calc(100% - 22px); /* 计算宽度,保留一些空间 */
  29. padding: 10px; /* 内边距 */
  30. border: 1px solid #ddd; /* 边框 */
  31. border-radius: 5px; /* 边角圆滑化 */
  32. }
  33. button {
  34. width: 100%; /* 按钮宽度100% */
  35. padding: 10px; /* 内边距 */
  36. background-color: #5c67f2; /* 按钮背景颜色 */
  37. border: none; /* 无边框 */
  38. color: white; /* 文字颜色白色 */
  39. border-radius: 5px; /* 边角圆滑化 */
  40. cursor: pointer; /* 鼠标悬停指针形状 */
  41. }
  42. button:hover {
  43. background-color: #4a54e1; /* 鼠标悬停时变色 */
  44. }
  45. a {
  46. color: #5c67f2; /* 链接颜色 */
  47. text-decoration: none; /* 无下划线 */
  48. }
  49. a:hover {
  50. text-decoration: underline; /* 悬停时出现下划线 */
  51. }