styles.css 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. /* 共享样式文件 */
  2. body {
  3. font-family: 'Segoe UI', Arial, sans-serif;
  4. margin: 0;
  5. padding: 0;
  6. background-color: #f8f9fa;
  7. color: #333;
  8. }
  9. .container {
  10. max-width: 1200px;
  11. margin: 0 auto;
  12. padding: 20px;
  13. }
  14. header {
  15. background-color: #4a76a8;
  16. color: white;
  17. padding: 15px 0 0 0;
  18. margin-bottom: 20px;
  19. box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  20. }
  21. h1 {
  22. text-align: center;
  23. margin: 0;
  24. padding: 10px;
  25. font-weight: 500;
  26. }
  27. textarea {
  28. width: 100%;
  29. height: 150px;
  30. margin: 10px 0;
  31. padding: 10px;
  32. border: 1px solid #ddd;
  33. border-radius: 4px;
  34. font-family: monospace;
  35. font-size: 14px;
  36. resize: vertical;
  37. background-color: #fff;
  38. }
  39. table {
  40. width: 100%;
  41. margin: 20px 0;
  42. border-collapse: collapse;
  43. text-align: center;
  44. background-color: #fff;
  45. box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  46. border-radius: 4px;
  47. overflow: hidden;
  48. }
  49. th, td {
  50. border: 1px solid #e0e0e0;
  51. padding: 12px 8px;
  52. }
  53. th {
  54. background-color: #4a76a8;
  55. color: white;
  56. font-weight: 500;
  57. }
  58. tr:nth-child(even) {
  59. background-color: #f5f5f5;
  60. }
  61. .formula {
  62. margin: 20px 0;
  63. font-size: 16px;
  64. line-height: 1.6;
  65. text-align: left;
  66. background-color: #fff;
  67. padding: 20px;
  68. border-radius: 4px;
  69. box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  70. }
  71. .highlight {
  72. background-color: #f0f4f8;
  73. border: 1px solid #d0d9e6;
  74. border-radius: 4px;
  75. padding: 15px;
  76. font-family: monospace;
  77. display: block;
  78. text-align: center;
  79. margin: 15px 0;
  80. }
  81. .tableInput {
  82. width: 100%;
  83. padding: 8px;
  84. border: 1px solid #ddd;
  85. border-radius: 4px;
  86. text-align: center;
  87. box-sizing: border-box;
  88. }
  89. button {
  90. background-color: #4a76a8;
  91. color: white;
  92. border: none;
  93. padding: 10px 15px;
  94. border-radius: 4px;
  95. cursor: pointer;
  96. font-size: 16px;
  97. transition: background-color 0.3s;
  98. }
  99. button:hover {
  100. background-color: #3a5a80;
  101. }
  102. section {
  103. margin-bottom: 30px;
  104. }
  105. .section-title {
  106. border-bottom: 2px solid #4a76a8;
  107. padding-bottom: 5px;
  108. margin-bottom: 15px;
  109. font-weight: 500;
  110. color: #4a76a8;
  111. }
  112. .params-table {
  113. width: 60%;
  114. margin: 20px auto;
  115. }
  116. /* 标签式导航菜单 */
  117. .nav-tabs {
  118. display: flex;
  119. justify-content: center;
  120. padding: 0;
  121. margin: 0;
  122. list-style: none;
  123. background-color: #3a5a80;
  124. border-bottom: 3px solid #4a76a8;
  125. }
  126. .nav-tabs li {
  127. margin: 0;
  128. }
  129. .nav-tabs a {
  130. display: block;
  131. color: white;
  132. text-decoration: none;
  133. padding: 12px 20px;
  134. transition: all 0.3s ease;
  135. position: relative;
  136. font-weight: 500;
  137. }
  138. .nav-tabs a:hover {
  139. background-color: rgba(255, 255, 255, 0.1);
  140. }
  141. .nav-tabs a.active {
  142. background-color: #4a76a8;
  143. color: white;
  144. }
  145. .nav-tabs a.active::after {
  146. content: '';
  147. position: absolute;
  148. bottom: 0;
  149. left: 0;
  150. width: 100%;
  151. height: 3px;
  152. background-color: white;
  153. }
  154. /* 数学公式样式 */
  155. .math-formula {
  156. font-family: 'Times New Roman', Times, serif;
  157. font-size: 18px;
  158. }
  159. .math-sum {
  160. position: relative;
  161. display: inline-block;
  162. vertical-align: middle;
  163. text-align: center;
  164. padding: 0 5px;
  165. }
  166. .math-sum::before {
  167. content: '\2211';
  168. font-size: 24px;
  169. }
  170. .math-sum .math-limits {
  171. display: block;
  172. font-size: 12px;
  173. line-height: 12px;
  174. position: relative;
  175. }
  176. .math-sum .math-limits .math-from {
  177. position: absolute;
  178. right: 0;
  179. bottom: -10px;
  180. }
  181. .math-sum .math-limits .math-to {
  182. position: absolute;
  183. right: 0;
  184. top: -10px;
  185. }
  186. /* 响应式设计 */
  187. @media (max-width: 768px) {
  188. .container {
  189. padding: 10px;
  190. }
  191. .params-table {
  192. width: 100%;
  193. }
  194. .formula {
  195. padding: 15px;
  196. }
  197. .nav-tabs {
  198. flex-wrap: wrap;
  199. }
  200. .nav-tabs a {
  201. padding: 10px 15px;
  202. font-size: 14px;
  203. }
  204. h1 {
  205. font-size: 24px;
  206. }
  207. }