修改考试手机端效果

This commit is contained in:
2026-05-03 20:20:50 +08:00
Unverified
parent df13cc6a9b
commit c8f6d13d84
3 changed files with 126 additions and 11 deletions
+94 -10
View File
@@ -1178,6 +1178,10 @@ h2 {
z-index: -1;
}
.score-fab {
display: none;
}
.score-panel {
display: grid;
gap: 12px;
@@ -1780,7 +1784,7 @@ h2 {
@media (max-width: 820px) {
body:has(.score-sidebar) {
padding-bottom: min(52vh, 540px);
padding-bottom: 86px;
}
.site-header {
@@ -1873,16 +1877,60 @@ h2 {
padding-right: 0;
}
.score-fab {
position: fixed;
right: 18px;
bottom: 18px;
z-index: 30;
width: 58px;
height: 58px;
display: grid;
place-items: center;
border: 1px solid rgba(255, 253, 247, 0.62);
border-radius: 50%;
background: var(--green);
color: #fffdf7;
box-shadow: 0 16px 38px rgba(13, 20, 19, 0.28);
font: inherit;
font-size: 22px;
font-weight: 900;
line-height: 1;
cursor: pointer;
transition:
background 180ms ease,
transform 180ms ease,
box-shadow 180ms ease;
}
.score-fab[aria-expanded="true"] {
background: var(--coral);
transform: scale(1.04);
}
.score-sidebar {
position: fixed;
top: auto;
left: 12px;
right: 12px;
bottom: 12px;
bottom: 88px;
width: auto;
max-height: min(46vh, 500px);
max-height: min(64vh, 560px);
border-radius: 10px;
background: rgba(255, 253, 247, 0.96);
box-shadow: 0 18px 44px rgba(13, 20, 19, 0.22);
opacity: 0;
pointer-events: none;
transform: translateY(14px) scale(0.98);
transform-origin: bottom right;
transition:
opacity 180ms ease,
transform 180ms ease;
}
.score-sidebar.is-open {
opacity: 1;
pointer-events: auto;
transform: translateY(0) scale(1);
}
.score-panel {
@@ -1890,7 +1938,12 @@ h2 {
}
.score-sidebar-head {
padding: 14px 14px 0;
position: sticky;
top: 0;
z-index: 1;
padding: 12px 14px 8px;
border-bottom: 1px solid var(--line);
background: rgba(255, 253, 247, 0.98);
}
.score-sidebar-head h2 {
@@ -1903,6 +1956,12 @@ h2 {
font-size: 12px;
}
.score-sidebar-head p:not(.eyebrow),
.answer-card-profile,
.score-total-note {
display: none;
}
.score-group {
padding: 12px;
}
@@ -1933,12 +1992,20 @@ h2 {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.score-total {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.score-total > div {
border-right: 0;
border-right: 1px solid var(--line);
border-bottom: 1px solid var(--line);
}
.score-total > div:last-child {
.score-total > div:nth-child(even) {
border-right: 0;
}
.score-total > div:nth-last-child(-n + 2) {
border-bottom: 0;
}
@@ -2037,11 +2104,13 @@ h2 {
}
.exam-paper {
padding: 16px;
padding: 14px;
border-radius: 0;
}
.exam-paper p {
font-size: 15px;
line-height: 1.78;
}
.exam-paper h2 {
@@ -2053,8 +2122,9 @@ h2 {
}
.exam-question {
grid-template-columns: 32px minmax(0, 1fr);
grid-template-columns: 30px minmax(0, 1fr);
gap: 8px;
margin-top: 18px !important;
}
.exam-question-number {
@@ -2065,9 +2135,15 @@ h2 {
.exam-options {
grid-template-columns: 1fr;
gap: 8px;
margin-left: 0;
}
.exam-option {
min-height: 42px;
padding: 8px 10px;
}
.exam-fill-answer {
grid-template-columns: 1fr;
margin-left: 0;
@@ -2075,6 +2151,7 @@ h2 {
.name-fill-grid {
grid-template-columns: 1fr 1fr;
gap: 7px;
margin-left: 0;
padding: 10px;
}
@@ -2103,8 +2180,15 @@ h2 {
.score-sidebar {
left: 8px;
right: 8px;
bottom: 8px;
max-height: 50vh;
bottom: 82px;
max-height: min(66vh, 520px);
}
.score-fab {
right: 14px;
bottom: 14px;
width: 56px;
height: 56px;
}
.score-group h3 {