style.css 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. /* 伺服驱动选型工具 - 样式表 */
  2. * {
  3. margin: 0;
  4. padding: 0;
  5. box-sizing: border-box;
  6. }
  7. body {
  8. font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  9. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  10. min-height: 100vh;
  11. padding: 20px;
  12. }
  13. .container {
  14. max-width: 1200px;
  15. margin: 0 auto;
  16. background: white;
  17. border-radius: 15px;
  18. box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  19. overflow: hidden;
  20. }
  21. .header {
  22. background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  23. color: white;
  24. padding: 30px;
  25. text-align: center;
  26. }
  27. .header h1 {
  28. font-size: 2.5em;
  29. margin-bottom: 10px;
  30. }
  31. .subtitle {
  32. font-size: 1.1em;
  33. opacity: 0.9;
  34. }
  35. .main-content {
  36. display: grid;
  37. grid-template-columns: 1fr 1fr;
  38. gap: 20px;
  39. padding: 30px;
  40. }
  41. .card {
  42. background: #f8f9fa;
  43. border-radius: 10px;
  44. padding: 20px;
  45. box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  46. }
  47. .card h2 {
  48. color: #333;
  49. margin-bottom: 20px;
  50. font-size: 1.5em;
  51. }
  52. .form-group {
  53. margin-bottom: 15px;
  54. }
  55. .form-group label {
  56. display: block;
  57. margin-bottom: 5px;
  58. font-weight: 600;
  59. color: #555;
  60. }
  61. .form-control {
  62. width: 100%;
  63. padding: 10px;
  64. border: 2px solid #ddd;
  65. border-radius: 5px;
  66. font-size: 14px;
  67. transition: border-color 0.3s;
  68. }
  69. .form-control:focus {
  70. outline: none;
  71. border-color: #4facfe;
  72. }
  73. .form-control.error {
  74. border-color: #e74c3c;
  75. }
  76. .btn-group {
  77. display: flex;
  78. gap: 10px;
  79. margin-top: 20px;
  80. }
  81. .btn {
  82. padding: 10px 20px;
  83. border: none;
  84. border-radius: 5px;
  85. cursor: pointer;
  86. font-size: 14px;
  87. font-weight: 600;
  88. transition: all 0.3s;
  89. }
  90. .btn-primary {
  91. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  92. color: white;
  93. }
  94. .btn-primary:hover {
  95. transform: translateY(-2px);
  96. box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
  97. }
  98. .btn-secondary {
  99. background: #6c757d;
  100. color: white;
  101. }
  102. .btn-secondary:hover {
  103. background: #5a6268;
  104. transform: translateY(-2px);
  105. }
  106. .results-grid {
  107. display: grid;
  108. grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  109. gap: 15px;
  110. margin-top: 15px;
  111. }
  112. .result-card {
  113. background: white;
  114. padding: 15px;
  115. border-radius: 8px;
  116. box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  117. text-align: center;
  118. }
  119. .result-label {
  120. font-size: 12px;
  121. color: #666;
  122. margin-bottom: 5px;
  123. }
  124. .result-value {
  125. font-size: 18px;
  126. font-weight: bold;
  127. color: #333;
  128. }
  129. .placeholder {
  130. color: #999;
  131. font-style: italic;
  132. text-align: center;
  133. padding: 20px;
  134. }
  135. .warning {
  136. background: #fff3cd;
  137. color: #856404;
  138. padding: 10px;
  139. border-radius: 5px;
  140. margin-top: 10px;
  141. }
  142. .error {
  143. background: #f8d7da;
  144. color: #721c24;
  145. padding: 10px;
  146. border-radius: 5px;
  147. margin-top: 10px;
  148. }
  149. .hidden {
  150. display: none !important;
  151. }
  152. .guidance-section ul {
  153. list-style-type: none;
  154. padding-left: 0;
  155. }
  156. .guidance-section li {
  157. margin-bottom: 8px;
  158. padding: 8px;
  159. background: white;
  160. border-radius: 5px;
  161. box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  162. }
  163. .alert {
  164. position: fixed;
  165. top: 20px;
  166. right: 20px;
  167. padding: 15px 20px;
  168. border-radius: 5px;
  169. color: white;
  170. font-weight: bold;
  171. z-index: 1000;
  172. animation: slideIn 0.3s ease-out;
  173. }
  174. .alert-info {
  175. background: #17a2b8;
  176. }
  177. .alert-success {
  178. background: #28a745;
  179. }
  180. .alert-warning {
  181. background: #ffc107;
  182. color: #212529;
  183. }
  184. .alert-error {
  185. background: #dc3545;
  186. }
  187. @keyframes slideIn {
  188. from {
  189. transform: translateX(100%);
  190. opacity: 0;
  191. }
  192. to {
  193. transform: translateX(0);
  194. opacity: 1;
  195. }
  196. }
  197. /* 响应式设计 */
  198. @media (max-width: 768px) {
  199. .main-content {
  200. grid-template-columns: 1fr;
  201. }
  202. .header h1 {
  203. font-size: 2em;
  204. }
  205. .btn-group {
  206. flex-direction: column;
  207. }
  208. }