fix: 라이트박스 이미지 크기 고정 및 스크롤바 숨기기
- 이미지 max-h를 75vh에서 900px 고정값으로 변경 - 라이트박스 컨테이너 min값 1400x1200으로 설정 - 스크롤바 숨기기 (Firefox/Chrome/Safari 지원)
This commit is contained in:
parent
5610a337c5
commit
326cb02df6
3 changed files with 14 additions and 7 deletions
|
|
@ -73,3 +73,8 @@ body {
|
|||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* 라이트박스 스크롤바 숨기기 */
|
||||
.lightbox-no-scrollbar::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -474,10 +474,11 @@ function AlbumDetail() {
|
|||
animate={{ opacity: 1 }}
|
||||
exit={{ opacity: 0 }}
|
||||
transition={{ duration: 0.2 }}
|
||||
className="fixed inset-0 bg-black/95 z-50 overflow-auto"
|
||||
className="fixed inset-0 bg-black/95 z-50 overflow-scroll lightbox-no-scrollbar"
|
||||
style={{ scrollbarWidth: 'none', msOverflowStyle: 'none' }}
|
||||
>
|
||||
{/* 내부 컨테이너 - min-width, min-height 적용 */}
|
||||
<div className="min-w-[1200px] min-h-[800px] w-full h-full relative flex items-center justify-center">
|
||||
<div className="min-w-[1400px] min-h-[1200px] w-full h-full relative flex items-center justify-center">
|
||||
{/* 상단 버튼들 */}
|
||||
<div className="absolute top-6 right-6 flex gap-3 z-10">
|
||||
{/* 다운로드 버튼 */}
|
||||
|
|
@ -525,7 +526,7 @@ function AlbumDetail() {
|
|||
<motion.video
|
||||
key={lightbox.index}
|
||||
src={lightbox.images[lightbox.index]}
|
||||
className={`max-w-[1100px] max-h-[75vh] object-contain transition-opacity duration-200 ${imageLoaded ? 'opacity-100' : 'opacity-0'}`}
|
||||
className={`max-w-[1100px] max-h-[900px] object-contain transition-opacity duration-200 ${imageLoaded ? 'opacity-100' : 'opacity-0'}`}
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
onCanPlay={() => setImageLoaded(true)}
|
||||
initial={{ x: slideDirection * 100 }}
|
||||
|
|
@ -539,7 +540,7 @@ function AlbumDetail() {
|
|||
key={lightbox.index}
|
||||
src={lightbox.images[lightbox.index]}
|
||||
alt="확대 이미지"
|
||||
className={`max-w-[1100px] max-h-[75vh] object-contain transition-opacity duration-200 ${imageLoaded ? 'opacity-100' : 'opacity-0'}`}
|
||||
className={`max-w-[1100px] max-h-[900px] object-contain transition-opacity duration-200 ${imageLoaded ? 'opacity-100' : 'opacity-0'}`}
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
onLoad={() => setImageLoaded(true)}
|
||||
initial={{ x: slideDirection * 100 }}
|
||||
|
|
|
|||
|
|
@ -308,10 +308,11 @@ function AlbumGallery() {
|
|||
animate={{ opacity: 1 }}
|
||||
exit={{ opacity: 0 }}
|
||||
transition={{ duration: 0.2 }}
|
||||
className="fixed inset-0 bg-black/95 z-50 overflow-auto"
|
||||
className="fixed inset-0 bg-black/95 z-50 overflow-scroll lightbox-no-scrollbar"
|
||||
style={{ scrollbarWidth: 'none', msOverflowStyle: 'none' }}
|
||||
>
|
||||
{/* 내부 컨테이너 - min-width, min-height 적용 (화면 줄여도 크기 유지, 스크롤) */}
|
||||
<div className="min-w-[1200px] min-h-[800px] w-full h-full relative flex items-center justify-center">
|
||||
<div className="min-w-[1400px] min-h-[1200px] w-full h-full relative flex items-center justify-center">
|
||||
{/* 상단 버튼들 */}
|
||||
<div className="absolute top-6 right-6 flex gap-3 z-10">
|
||||
<button
|
||||
|
|
@ -356,7 +357,7 @@ function AlbumGallery() {
|
|||
key={lightbox.index}
|
||||
src={photos[lightbox.index]?.originalUrl}
|
||||
alt="확대 이미지"
|
||||
className={`max-w-[1100px] max-h-[75vh] object-contain transition-opacity duration-200 ${imageLoaded ? 'opacity-100' : 'opacity-0'}`}
|
||||
className={`max-w-[1100px] max-h-[900px] object-contain transition-opacity duration-200 ${imageLoaded ? 'opacity-100' : 'opacity-0'}`}
|
||||
onLoad={() => setImageLoaded(true)}
|
||||
initial={{ x: slideDirection * 100 }}
|
||||
animate={{ x: 0 }}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue