/**index.wxss**/ /* 轮播图 */ .swiper-container{ width: 90%; height: 280rpx; /* 居中作用 */ margin: 0rpx auto; position: relative; border-radius: 15rpx; overflow: hidden; } .swiper{ width: 100%; height: 100%; border-radius: 15rpx; } .swiperItem{ width: 100%; height: 100%; border-radius: 15rpx; } .swiperItem>image{ width: 100%; height: 100%; border-radius: 15rpx; } .dots{ width: auto; height: 10rpx; position: absolute; bottom: 20rpx; border-radius: 50rpx; left: 240rpx; display: flex; justify-content: space-between; align-items: center; padding: 3rpx 10rpx; } .dotsItem{ width: 8rpx; height: 8rpx; margin: 0rpx 8rpx; border-radius: 50%; background-color: #cdcdcd; transition: all .3s; } .active{ width: 10rpx; height: 10rpx; background-color: #fff; } /* 宫格导航 */ .nav{ width: 90%; height: 132rpx; margin: 0rpx auto; margin-top: 40rpx; display: flex; justify-content: space-between; align-items: center; align-content: center; } .navItem{ width: 94rpx; font-size: 20rpx; text-align: center; line-height: 35rpx; color: #aaa; } .navIcon{ width: 84rpx; height: 84rpx; } /* 猜你喜欢 */ .like{ width: 90%; margin: 0rpx auto; margin-top: 40rpx; } .likeItemBox{ width: 100%; display: flex; justify-content: space-between; overflow: hidden; } .likeItem{ width: 210rpx; height: 310rpx; border-radius: 15rpx; } .likeimg{ width: 210rpx; height: 210rpx; border-radius: 15rpx; position: relative; } .likeItemIcon{ width: 100%; height: 100%; border-radius: 15rpx; } .likeText{ font-size: 28rpx; color: #333; margin-top: 10rpx; display: -webkit-box; -webkit-line-clamp: 2;/*行数n*/ -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; } .likecover{ width: 190rpx; height: 40rpx; /* 透明背景层 */ background-image: linear-gradient(rgba(0, 0, 0, 0.01), rgba(0, 0, 0, 1)); /* opacity: 0.3; */ position: absolute; bottom: 0rpx; color: #fff; font-size: 25rpx; padding: 5rpx 10rpx; border-bottom-left-radius: 15rpx; border-bottom-right-radius: 15rpx; } .dataNotip{ width: 100%; height: 300rpx; padding-top: 150rpx; } .tip{ width: auto; height: 100rpx; text-align: center; margin: 0rpx auto; color: red; font-weight: 800; }