-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from Quolls/feat/multi-imgs-2
feat(Image&Location): swiper, auto update location
- Loading branch information
Showing
5 changed files
with
294 additions
and
16 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* .swiper { | ||
width: 30%; | ||
height: 30%; | ||
} */ | ||
|
||
.swiper-slide { | ||
text-align: center; | ||
font-size: 18px; | ||
background: #fff; | ||
|
||
/* Center slide text vertically */ | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
|
||
.swiper-slide img { | ||
display: block; | ||
object-fit: cover; | ||
} | ||
|
||
.mySwiper { | ||
width: 500px !important; /* 或者任何具体的宽度值 */ | ||
height: 500px !important; /* 根据你的需求调整高度 */ | ||
} | ||
|
||
.mySwiper img { | ||
width: 100%; /* 图片宽度占满容器 */ | ||
height: 100%; /* 图片高度占满容器 */ | ||
object-fit: cover; /* 保持宽高比,可能会裁剪图片 */ | ||
} | ||
|
||
@media (max-width: 600px) { | ||
.mySwiper { | ||
width: 350px !important; | ||
height: 200px !important; /* 在小屏幕上减小高度 */ | ||
} | ||
} |
Oops, something went wrong.