| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138 |
- /* ============================================ */
- /* 家长课堂-手机端课程列表样式 */
- /* 包含电脑端和移动端适配 */
- /* ============================================ */
- /* -------------------------- */
- /* 默认状态(电脑端) */
- /* -------------------------- */
- /* 默认隐藏移动端容器 */
- .parent-mobile-container {
- display: none !important;
- }
- /* 默认显示电脑端课程项 */
- .parent-mobile-course-item {
- display: flex !important;
- }
- /* -------------------------- */
- /* 移动端样式(≤768px) */
- /* -------------------------- */
- @media screen and (max-width: 768px) {
- /* 隐藏电脑端课程项 */
- .parent-mobile-course-item {
- display: none !important;
- }
-
- /* 显示移动端容器 */
- .parent-mobile-container {
- display: block !important;
- width: 100%;
- max-width: 100vw; /* 最大宽度不超过视口宽度 */
- padding: 8px;
- box-sizing: border-box;
- overflow: hidden;
- }
-
- /* 移动端课程项 */
- .parent-mobile-item {
- display: flex;
- align-items: center;
- background: #fff;
- border-radius: 12px;
- padding: 10px;
- margin-bottom: 10px;
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
- cursor: pointer;
- transition: box-shadow 0.2s ease;
- box-sizing: border-box;
- overflow: hidden;
- width: 100%;
- max-width: 100%;
- }
-
- .parent-mobile-item:active {
- box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
- }
-
- /* 左侧图片 */
- .parent-mobile-image {
- width: 80px;
- height: 60px;
- border-radius: 8px;
- overflow: hidden;
- flex-shrink: 0;
- }
-
- .parent-mobile-image img {
- width: 100%;
- height: 100%;
- object-fit: cover;
- }
-
- /* 中间内容 */
- .parent-mobile-content {
- flex: 1;
- padding: 0 12px 0 16px; /* 增加左边距,距离图片更远 */
- display: flex;
- flex-direction: column;
- min-width: 0;
- max-width: calc(100% - 130px); /* 减去图片和三点按钮的宽度 */
- align-items: flex-start; /* 居左显示 */
- }
-
- .parent-mobile-title {
- font-size: 14px;
- font-weight: 600;
- color: #333;
- margin-bottom: 4px;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- word-break: break-all;
- }
-
- .parent-mobile-index {
- margin-right: 6px;
- color: #999;
- font-weight: normal;
- }
-
- .parent-mobile-desc {
- font-size: 12px;
- color: #999;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
-
- /* 右侧三点按钮 */
- .parent-mobile-more {
- width: 36px;
- height: 36px;
- display: flex;
- align-items: center;
- justify-content: center;
- color: #ccc;
- font-size: 18px;
- }
- }
- /* -------------------------- */
- /* 电脑端样式(>768px) */
- /* -------------------------- */
- @media screen and (min-width: 769px) {
- /* 确保移动端容器隐藏 */
- .parent-mobile-container {
- display: none !important;
- }
-
- /* 确保电脑端课程项显示 */
- .parent-mobile-course-item {
- display: flex !important;
- }
- }
|