优化照片集缩放

This commit is contained in:
tlyong1992
2022-06-08 12:57:12 +08:00
parent 15ebb71db6
commit 81ff604c0d
2 changed files with 15 additions and 0 deletions

View File

@@ -33,6 +33,7 @@ const NotionPage = ({ post }) => {
const zoom = isBrowser() && mediumZoom({
container: '.notion-viewport',
background: 'rgba(0, 0, 0, 0.2)',
scrollOffset: 200,
margin: getMediumZoomMargin()
})

View File

@@ -207,6 +207,20 @@
.medium-zoom-image--opened {
z-index: 301;
/* width: auto !important; */
}
@media (max-width: 768px){
.medium-zoom-image--opened {
object-fit: fill !important;
height: auto !important;
}
}
@media (min-width: 768px){
.medium-zoom-image--opened {
object-fit: scale-down !important;
}
}
.notion-frame {