quiz.wxss 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. /* 全局红色主题 */
  2. page {
  3. background-color: #fef6f6;
  4. font-family: "Microsoft YaHei";
  5. }
  6. /* 顶部标题 */
  7. .header {
  8. position: relative;
  9. height: 250px;
  10. }
  11. .header image {
  12. height: 250px;
  13. width: 400px;
  14. }
  15. .header .title {
  16. position: absolute;
  17. bottom: 20rpx;
  18. left: 0;
  19. right: 0;
  20. text-align: center;
  21. color: white;
  22. font-size: 40rpx;
  23. font-weight: bold;
  24. text-shadow: 2rpx 2rpx 4rpx rgba(0,0,0,0.5);
  25. }
  26. /* 题目卡片 */
  27. .card {
  28. margin: 30rpx;
  29. background: white;
  30. border-radius: 16rpx;
  31. box-shadow: 0 4rpx 12rpx rgba(210, 50, 50, 0.1);
  32. overflow: hidden;
  33. }
  34. .question-box {
  35. padding: 30rpx;
  36. border-bottom: 2rpx dashed #e74c3c;
  37. }
  38. .category {
  39. display: block;
  40. color: #e74c3c;
  41. font-size: 28rpx;
  42. margin-bottom: 15rpx;
  43. }
  44. .question-text {
  45. font-size: 34rpx;
  46. line-height: 1.5;
  47. }
  48. /* 选项样式 */
  49. .options {
  50. padding: 20rpx;
  51. }
  52. .option {
  53. display: flex;
  54. align-items: center;
  55. padding: 25rpx;
  56. margin-bottom: 20rpx;
  57. border-radius: 12rpx;
  58. background: #f9f2f2;
  59. transition: all 0.3s;
  60. }
  61. .option.selected {
  62. background: #e74c3c;
  63. }
  64. .option.selected .option-key,
  65. .option.selected .option-value {
  66. color: white;
  67. }
  68. .option-key {
  69. width: 60rpx;
  70. font-weight: bold;
  71. color: #e74c3c;
  72. }
  73. .option-value {
  74. flex: 1;
  75. }
  76. /* 底部栏 */
  77. .footer {
  78. position: fixed;
  79. bottom: 0;
  80. left: 0;
  81. right: 0;
  82. display: flex;
  83. justify-content: space-between;
  84. align-items: center;
  85. padding: 20rpx 30rpx;
  86. background: white;
  87. box-shadow: 0 -2rpx 10rpx rgba(0,0,0,0.05);
  88. }
  89. .score {
  90. display: flex;
  91. align-items: center;
  92. color: #e74c3c;
  93. font-size: 32rpx;
  94. }
  95. .star {
  96. width: 40rpx;
  97. height: 40rpx;
  98. margin-right: 10rpx;
  99. }
  100. .submit-btn {
  101. background: linear-gradient(to right, #e74c3c, #c0392b);
  102. color: white;
  103. border-radius: 50rpx;
  104. font-size: 32rpx;
  105. padding: 0 40rpx;
  106. height: 80rpx;
  107. line-height: 80rpx;
  108. }
  109. /* 结果弹窗 */
  110. .result-modal {
  111. background: rgba(0,0,0,0.5);
  112. }
  113. .modal-content {
  114. width: 80%;
  115. margin: 40vh auto;
  116. padding: 40rpx;
  117. border-radius: 20rpx;
  118. text-align: center;
  119. background: white;
  120. }
  121. .modal-content.correct {
  122. border-top: 10rpx solid #2ecc71;
  123. }
  124. .modal-content.wrong {
  125. border-top: 10rpx solid #e74c3c;
  126. }
  127. .modal-content image {
  128. width: 100rpx;
  129. height: 100rpx;
  130. margin-bottom: 20rpx;
  131. }
  132. .modal-content .explanation {
  133. display: block;
  134. margin: 30rpx 0;
  135. color: #7f8c8d;
  136. font-size: 28rpx;
  137. }