style(ActivitiesCover): 调整背景图尺寸和适配方式
将宽度从百分比改为视窗单位,高度计算值从300rpx调整为100rpx 使用cover替代contain确保背景图更好适配容器
Showing
1 changed file
with
3 additions
and
3 deletions
| ... | @@ -10,9 +10,9 @@ | ... | @@ -10,9 +10,9 @@ |
| 10 | position: absolute; | 10 | position: absolute; |
| 11 | top: 0; | 11 | top: 0; |
| 12 | left: 0; | 12 | left: 0; |
| 13 | - width: 100%; | 13 | + width: 100vw; |
| 14 | - height: calc(100vh - 300rpx); // 减去底部区域的高度,确保背景图不被遮挡 | 14 | + height: calc(100vh - 100rpx); // 减去底部区域的高度,确保背景图不被遮挡 |
| 15 | - object-fit: contain; | 15 | + object-fit: cover; |
| 16 | object-position: top center; | 16 | object-position: top center; |
| 17 | z-index: 1; | 17 | z-index: 1; |
| 18 | } | 18 | } | ... | ... |
-
Please register or login to post a comment