From 75c63ae6c5cb34c777c9fb3b375379952f7995b4 Mon Sep 17 00:00:00 2001 From: litian <C21AF165> Date: 星期五, 12 四月 2024 20:45:13 +0800 Subject: [PATCH] css --- pages/home/home.wxss | 223 ++++++++++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 187 insertions(+), 36 deletions(-) diff --git a/pages/home/home.wxss b/pages/home/home.wxss index fa02cf0..465595b 100644 --- a/pages/home/home.wxss +++ b/pages/home/home.wxss @@ -1,7 +1,4 @@ -page { - box-sizing: border-box; - padding-bottom: calc(env(safe-area-inset-bottom) + 96rpx); -} +@import "./home.skeleton.wxss"; .background { width: 100%; @@ -9,11 +6,11 @@ top: 0; left: 0; height: 80rpx; + line-height: 88rpx; z-index: 3; text-align: center; - padding-top: 110rpx; color: #fff; - font-size: 36rpx; + font-size: 34rpx; } .white { @@ -33,7 +30,7 @@ } .home-page-header { - padding-top: 230rpx; + padding-top: 180rpx; } .home-page-header .bg { @@ -62,11 +59,65 @@ .home-page-header .swiper-wrap { margin-top: 30rpx; margin-bottom: 10rpx; + height: 380rpx; + width: 100%; + border-radius: 18rpx; + overflow: hidden; + display: flex; + align-items: center; + justify-content: center; + background: #f6f6f6; } + +.swiper { + height: 380rpx; + width: 100%; +} + +.swiperItem { + position: relative; + height: 380rpx; + width: 100%; +} + +.swiper .img { + max-width: 100% !important; + /* max-height: 100% !important; */ + width: auto !important; + /* height: auto !important; */ + position: absolute !important; + top: 0 !important; + left: 0 !important; + right: 0 !important; + bottom: 0 !important; + margin: auto !important; +} + .home-page-menu .t-grid--card { margin: 0; } + +.t-grid-item__image { + width: 60rpx !important; + height: 56rpx !important; + position: relative; + +} + +.t-grid-item__image:not(:empty).t-grid-item__image--small .t-image { + width: auto !important; + height: auto !important; + max-width: 100% !important; + max-height: 100% !important; + position: absolute !important; + top: 0 !important; + left: 0 !important; + right: 0 !important; + bottom: 0 !important; + margin: auto !important; +} + .flex { display: flex; @@ -80,6 +131,7 @@ margin-top: 20rpx; display: block; padding: 0 24rpx; + margin-bottom: 11vh; } .tabCardPublic { @@ -93,13 +145,30 @@ } .tabCardPublic .icon { - width: 156rpx; + width: 192rpx; height: 48rpx; + position: relative; } -.tabCardPublic .icon .t-image { - width: 100%; - height: 100% +.iconOne .icon { + width: 156rpx; +} + +.iconTwo .icon { + width: 164rpx; +} + +.tabCardPublic .icon .iconImage { + width: auto; + height: auto; + max-width: 100%; + max-height: 100%; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + margin: auto; } .tabCardPublic .more { @@ -139,16 +208,16 @@ } .body-info { - padding: 20rpx; + padding: 16rpx; font-size: 28rpx; } .body-info .name { - font-size: 32rpx; - height: 88rpx; + font-size: 30rpx; + height: 80rpx; color: #333333; font-weight: bold; - line-height: 44rpx; + line-height: 40rpx; display: -webkit-box; margin-bottom: 10rpx; -webkit-box-orient: vertical; @@ -166,6 +235,18 @@ font-size: 26rpx; display: flex; justify-content: space-between; + display: -webkit-box; + /* 浣跨敤寮规�х洅瀛愬竷灞�妯″瀷 */ + -webkit-line-clamp: 1; + /* 鎺у埗鏂囨湰鐨勮鏁� */ + -webkit-box-orient: vertical; + /* 璁剧疆鐩掑瓙鐨勫瓙鍏冪礌鎺掑垪鏂瑰悜 */ + overflow: hidden; + /* 瓒呭嚭閮ㄥ垎闅愯棌 */ + text-overflow: ellipsis; + /* 瓒呭嚭閮ㄥ垎鏄剧ず鐪佺暐鍙� */ + white-space: normal; + flex: 1; } .body-info .price { @@ -173,14 +254,17 @@ color: #ff6d00; } +.t-tabs .t-tabs__item { + padding: 0 24rpx !important; +} + .t-tabs .t-tabs__item--active { color: #ff6d00; font-size: 30rpx; - /* background-image: url('/static/images/home/click-icon@2x.png'); */ background-repeat: no-repeat; - background-size: cover; - /* 纭繚鑳屾櫙鍥惧儚涓嶄細琚媺浼� */ - /* background-position: right; */ + background-size: 40% 64%; + background-position: right; + background-image: url(https://jsek.bnuic.com/website/image/click-icon.png); } .t-tabs .t-tabs__track { @@ -195,29 +279,37 @@ border: none !important; } +.t-tabs__item--evenly { + flex: 1 0 auto !important; +} + .listBox1, .listBox2 { - padding: 50rpx 0; + padding: 30rpx 0; } .listBox1 .listItemBox { - height: 220rpx; margin-bottom: 30rpx; } .listBox1 .specialSubject-img { - width: 400rpx; - height: 218rpx; + width: 336rpx; + height: 205rpx; + flex: 1; +} + +.listBox1 .body-info { + flex: 1; } .listBox1 .addCartImg, .listBox3 .addCartImg { - width: 30rpx; - height: 30rpx; + width: 32rpx; + height: 32rpx; } .listBox1 .priceBox { - margin-top: 14rpx; + margin-top: 10rpx; } .listBox2 { @@ -229,7 +321,7 @@ } .listBox2 .booksListItemBox { - width: calc(100%/3 - 30rpx); + width: calc(100%/3 - 32rpx); margin-bottom: 30rpx; margin-right: 45rpx; } @@ -240,7 +332,7 @@ } .listBox2 .specialSubject-img { - height: 300rpx; + height: 280rpx; width: 100%; box-shadow: 0px 0px 20rpx 2px #f1f1f1; } @@ -250,9 +342,8 @@ } .listBox2 .author { - height: 30rpx; + height: 28rpx; color: #333333; - font-weight: bold; line-height: 30rpx; display: -webkit-box; margin-bottom: 10rpx; @@ -262,9 +353,17 @@ text-overflow: ellipsis; } +.classHours { + font-size: 26rpx; +} + .listBox2 .empyt { padding: 20rpx; box-sizing: border-box; +} + +.listBox3 { + padding: 10rpx 0; } .listBox3 .textbooksItemBox { @@ -273,22 +372,23 @@ .listBox3 .textbooksItemBox .specialSubject-img { width: 190rpx; - height: 260rpx; + height: 250rpx; box-shadow: 0px 0px 20rpx 2px #f1f1f1; } .listBox3 .body-info { width: calc(100% - 190rpx); + padding: 10rpx; } .listBox3 .name { - font-size: 32rpx; + font-size: 30rpx; height: 44rpx; color: #333333; font-weight: bold; - line-height: 44rpx; + line-height: 40rpx; display: -webkit-box; - margin-bottom: 10rpx; + margin-bottom: 12rpx; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden; @@ -296,10 +396,10 @@ } .listBox3 .introduction { + height: 70rpx; color: #B4B6BD; line-height: 36rpx; display: -webkit-box; - margin-bottom: 10rpx; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; @@ -308,9 +408,60 @@ .listBox3 .author { line-height: 40rpx; - margin-bottom: 30rpx; + margin: 16rpx 0; } .readList { overflow: auto; +} + +.rankingList .listItem { + padding: 20rpx 0; +} + +.srcolbox { + width: 100%; + height: 400rpx; + white-space: nowrap; +} + +.booksListBox { + display: flex; +} + +.srcolbox .booksListItemBox { + width: 188rpx; + margin-right: 30rpx; +} + +.rankingList .specialSubject-img { + height: 254rpx; + width: 100%; + box-shadow: 0px 0px 20rpx 2px #f1f1f1; +} + +.rankingList .body-info { + padding: 20rpx 0; +} + +.rankingList .name { + height: 80rpx; + width: 188rpx; + color: #333333; + line-height: 40rpx; + display: -webkit-box; + /* 浣跨敤寮规�х洅瀛愬竷灞�妯″瀷 */ + -webkit-line-clamp: 2; + /* 鎺у埗鏂囨湰鐨勮鏁� */ + -webkit-box-orient: vertical; + /* 璁剧疆鐩掑瓙鐨勫瓙鍏冪礌鎺掑垪鏂瑰悜 */ + overflow: hidden; + /* 瓒呭嚭閮ㄥ垎闅愯棌 */ + text-overflow: ellipsis; + /* 瓒呭嚭閮ㄥ垎鏄剧ず鐪佺暐鍙� */ + white-space: normal; +} + +.t-loading__circular { + color: #ff6d00 !important; } \ No newline at end of file -- Gitblit v1.9.1