style1.css 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. /* 重置样式 */
  2. * {
  3. margin: 0;
  4. padding: 0;
  5. box-sizing: border-box;
  6. }
  7. /* 页面背景和基本样式 */
  8. body {
  9. font-family: 'Arial', sans-serif;
  10. background-color: #f7f7f7;
  11. color: #333;
  12. line-height: 1.6;
  13. padding: 0 20px;
  14. }
  15. .container {
  16. max-width: 900px;
  17. margin: 50px auto;
  18. padding: 20px;
  19. background-color: #fff;
  20. border-radius: 8px;
  21. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  22. }
  23. h1 {
  24. text-align: center;
  25. color: #4CAF50;
  26. margin-bottom: 30px;
  27. }
  28. h2 {
  29. margin-bottom: 20px;
  30. color: #333;
  31. }
  32. /* 新增公告表单样式 */
  33. .form-container {
  34. background-color: #f9f9f9;
  35. padding: 20px;
  36. border-radius: 8px;
  37. box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  38. }
  39. input[type="text"], textarea {
  40. width: 100%;
  41. padding: 12px;
  42. margin-bottom: 15px;
  43. border: 1px solid #ccc;
  44. border-radius: 4px;
  45. font-size: 16px;
  46. box-sizing: border-box;
  47. }
  48. input[type="text"]:focus, textarea:focus {
  49. outline: none;
  50. border-color: #4CAF50;
  51. }
  52. button[type="submit"] {
  53. background-color: #4CAF50;
  54. color: white;
  55. padding: 10px 20px;
  56. border: none;
  57. border-radius: 4px;
  58. cursor: pointer;
  59. font-size: 16px;
  60. transition: background-color 0.3s ease;
  61. }
  62. button[type="submit"]:hover {
  63. background-color: #45a049;
  64. }
  65. /* 公告列表样式 */
  66. .announcement-list {
  67. list-style-type: none;
  68. padding: 0;
  69. margin-top: 20px;
  70. }
  71. .announcement-list li {
  72. display: flex;
  73. justify-content: space-between;
  74. align-items: center;
  75. background-color: #fff;
  76. padding: 15px;
  77. margin-bottom: 10px;
  78. border: 1px solid #ddd;
  79. border-radius: 6px;
  80. box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  81. }
  82. .announcement-list a {
  83. font-weight: bold;
  84. text-decoration: none;
  85. color: #333;
  86. }
  87. .announcement-list button {
  88. background-color: #f44336;
  89. color: white;
  90. padding: 6px 12px;
  91. border: none;
  92. border-radius: 4px;
  93. cursor: pointer;
  94. font-size: 14px;
  95. transition: background-color 0.3s ease;
  96. }
  97. .announcement-list button:hover {
  98. background-color: #d32f2f;
  99. }
  100. .announcement-list button:focus {
  101. outline: none;
  102. }
  103. /* 居中对齐 */
  104. .text-center {
  105. text-align: center;
  106. }