| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285 |
- // 页面背景
- .tab2-content {
- --background: #FFF9E6;
-
- &::part(background) {
- background: #46B3DE;
- }
- }
- // 轮播图包装器
- .carousel-wrapper {
- padding: 16px 16px 0;
- }
- // 轮播图容器
- .carousel-container {
- width: 100%;
- overflow: hidden;
- border-radius: 20px;
- position: relative;
-
- .carousel-track {
- display: flex;
- transition: transform 0.5s ease-in-out;
- width: 200%; // 2张幻灯片
- }
-
- .slide-item {
- position: relative;
- width: 100%;
- height: 180px;
- display: flex;
- align-items: center;
- padding: 0 20px;
- overflow: hidden;
- flex-shrink: 0; // 防止被压缩
- .slide-bg {
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- z-index: 0;
- }
-
- .slide-content {
- position: relative;
- z-index: 2;
- flex: 1;
-
- h2 {
- font-size: 28px;
- font-weight: 800;
- color: #fff;
- margin: 0 0 4px;
- text-shadow: 0 2px 4px rgba(0,0,0,0.1);
- }
-
- p {
- font-size: 14px;
- color: rgba(255,255,255,0.9);
- margin: 0 0 16px;
- font-style: italic;
- }
-
- .challenge-btn {
- background: #7BC043;
- color: white;
- border: none;
- padding: 10px 24px;
- border-radius: 20px;
- font-size: 14px;
- font-weight: 600;
- box-shadow: 0 4px 12px rgba(123, 192, 67, 0.4);
- cursor: pointer;
-
- &:active {
- transform: scale(0.95);
- }
- }
- }
-
- img {
- position: absolute;
- right: 10px;
- bottom: 0;
- height: 160px;
- width: auto;
- object-fit: contain;
- z-index: 1;
- }
- }
- }
- // 轮播指示器 - 放在轮播图下面
- .carousel-dots {
- display: flex;
- justify-content: center;
- align-items: center;
- gap: 8px;
- margin-top: 12px;
- padding-bottom: 4px;
-
- .dot {
- width: 8px;
- height: 8px;
- border-radius: 50%;
- background: #FFF9E6;
- cursor: pointer;
- transition: all 0.3s ease;
-
- &.active {
- background: orange;
- width: 20px;
- border-radius: 4px;
- }
-
- &:hover {
- background: #46B3DE;
- }
- }
- }
- // 专项训练标题
- .section-header {
- display: flex;
- align-items: center;
- gap: 6px;
- padding: 0 16px;
- margin: 20px 0 12px;
-
- h3 {
- font-size: 23px;
- font-weight: 700;
- color: white;
- margin: 0;
- }
-
- .info-icon {
- font-size: 25px;
- color: white;
- }
- }
- // 训练卡片网格 - 每行4个
- .training-grid {
- display: grid;
- grid-template-columns: repeat(4, 1fr);
- gap: 12px;
- padding: 0 16px;
- margin-bottom: 24px;
- }
- // 训练卡片
- .training-card {
- background: white;
- border-radius: 16px;
- padding: 12px 8px;
- display: flex;
- flex-direction: column;
- align-items: center;
- box-shadow: 0 2px 8px rgba(0,0,0,0.06);
- position: relative;
- cursor: pointer;
- transition: transform 0.2s ease;
-
- &:active {
- transform: scale(0.95);
- }
-
- .card-icon {
- width: 48px;
- height: 48px;
- margin-bottom: 8px;
-
- img {
- width: 90%;
- height: 90%;
- object-fit: contain;
- }
- }
-
- .card-title {
- font-size: 0.95rem;
- color: black;
- text-align: center;
- line-height: 1.2;
- }
-
- }
- // 单词随身听区域
- .listen-section {
- padding: 0 16px 24px;
-
- .section-title {
- font-size: 18px;
- font-weight: 700;
- color: #333;
- margin: 0 0 12px;
- }
-
- .listen-cards {
- display: flex;
- flex-direction: column;
- gap: 12px;
- }
-
- .listen-card {
- background: white;
- border-radius: 16px;
- padding: 16px;
- display: flex;
- align-items: center;
- gap: 12px;
- box-shadow: 0 2px 8px rgba(0,0,0,0.06);
- position: relative;
- cursor: pointer;
-
- .listen-icon {
- width: 56px;
- height: 56px;
- flex-shrink: 0;
-
- img {
- width: 100%;
- height: 100%;
- object-fit: contain;
- }
- }
-
- .listen-info {
- flex: 1;
-
- h4 {
- font-size: 16px;
- font-weight: 700;
- color: #333;
- margin: 0 0 4px;
- }
-
- p {
- font-size: 13px;
- color: #999;
- margin: 0;
- }
- }
- }
- }
- // 暗色模式
- @media (prefers-color-scheme: dark) {
- .tab2-content {
- --background: #1a1a2e;
-
- &::part(background) {
- background: linear-gradient(180deg, #16213e 0%, #1a1a2e 30%);
- }
- }
-
- .carousel-dots .dot {
- background: #555;
-
- &.active {
- background: #46B3DE;
- }
- }
-
- .section-header h3,
- .listen-section .section-title,
- .listen-card .listen-info h4 {
- color: #fff;
- }
-
- .training-card,
- .listen-card {
- background: #2a2a3e;
-
- .card-title,
- .listen-info p {
- color: #aaa;
- }
- }
- }
|