UNPKG

vue3-photo-preview

Version:
350 lines (348 loc) 8.75 kB
@-webkit-keyframes PhotoView__rotate { from { -webkit-transform: rotate(0deg); transform: rotate(0deg); } to { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } @keyframes PhotoView__rotate { from { -webkit-transform: rotate(0deg); transform: rotate(0deg); } to { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } @-webkit-keyframes PhotoView__delayShow { 0%, 50% { opacity: 0; } 100% { opacity: 1; } } @keyframes PhotoView__delayShow { 0%, 50% { opacity: 0; } 100% { opacity: 1; } } .PhotoView__Spinner { -webkit-animation: PhotoView__delayShow 0.4s linear both; animation: PhotoView__delayShow 0.4s linear both; } .PhotoView__Spinner svg { display: block; -webkit-animation: PhotoView__rotate 0.6s linear infinite; animation: PhotoView__rotate 0.6s linear infinite; } @-webkit-keyframes PhotoView__animateIn { from { opacity: 0.4; -webkit-transform: scale(0.2); transform: scale(0.2); } to { opacity: 1; -webkit-transform: scale(1); transform: scale(1); } } @keyframes PhotoView__animateIn { from { opacity: 0.4; -webkit-transform: scale(0.2); transform: scale(0.2); } to { opacity: 1; -webkit-transform: scale(1); transform: scale(1); } } @-webkit-keyframes PhotoView__animateOut { from { opacity: 1; -webkit-transform: scale(1); transform: scale(1); } to { opacity: 0; -webkit-transform: scale(0.2); transform: scale(0.2); } } @keyframes PhotoView__animateOut { from { opacity: 1; -webkit-transform: scale(1); transform: scale(1); } to { opacity: 0; -webkit-transform: scale(0.2); transform: scale(0.2); } } .PhotoView__PhotoWrap { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; -webkit-box-align: center; -ms-flex-align: center; align-items: center; } .PhotoView__PhotoWrap .PhotoView__PhotoBox { width: 0; height: 0; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; -webkit-box-align: center; -ms-flex-align: center; align-items: center; } .PhotoView__PhotoWrap .PhotoView__PhotoBox.PhotoView__animateIn { opacity: 0.4; -webkit-animation: PhotoView__animateIn 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) both; animation: PhotoView__animateIn 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) both; } .PhotoView__PhotoWrap .PhotoView__PhotoBox.PhotoView__animateOut { opacity: 1; -webkit-animation: PhotoView__animateOut 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) both; animation: PhotoView__animateOut 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) both; } .PhotoView__PhotoWrap .PhotoView__PhotoBox .PhotoView__Photo { -ms-touch-action: none; touch-action: none; cursor: -webkit-grab; cursor: grab; display: block; } .PhotoView__PhotoWrap .PhotoView__PhotoBox .PhotoView__Photo:active { cursor: -webkit-grabbing; cursor: grabbing; } @-webkit-keyframes PhotoView__fade { from { opacity: 0; } to { opacity: 1; } } @keyframes PhotoView__fade { from { opacity: 0; } to { opacity: 1; } } .PhotoSlider__Wrapper.PhotoSlider__Clean .PhotoSlider__BannerWrap, .PhotoSlider__Wrapper.PhotoSlider__Clean .PhotoSlider__ArrowLeft, .PhotoSlider__Wrapper.PhotoSlider__Clean .PhotoSlider__ArrowRight, .PhotoSlider__Wrapper.PhotoSlider__Clean .PhotoSlider__FooterWrap { opacity: 0; } @media (any-hover: hover) { .PhotoSlider__Wrapper.PhotoSlider__Clean .PhotoSlider__BannerWrap:hover, .PhotoSlider__Wrapper.PhotoSlider__Clean .PhotoSlider__ArrowLeft:hover, .PhotoSlider__Wrapper.PhotoSlider__Clean .PhotoSlider__ArrowRight:hover, .PhotoSlider__Wrapper.PhotoSlider__Clean .PhotoSlider__FooterWrap:hover { opacity: 0; } } .PhotoSlider__Wrapper.PhotoSlider__Hide .PhotoSlider__BannerWrap, .PhotoSlider__Wrapper.PhotoSlider__Hide .PhotoSlider__ArrowLeft, .PhotoSlider__Wrapper.PhotoSlider__Hide .PhotoSlider__ArrowRight, .PhotoSlider__Wrapper.PhotoSlider__Hide .PhotoSlider__FooterWrap { opacity: 0; } .PhotoSlider__Wrapper { position: fixed; left: 0; top: 0; width: 100%; height: 100%; overflow: hidden; z-index: 2000; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } .PhotoSlider__Wrapper .PhotoSlider__Backdrop { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; } .PhotoSlider__Wrapper .PhotoSlider__Backdrop.PhotoSlider__fadeIn { opacity: 0; -webkit-animation: PhotoView__fade 0.4s linear both; animation: PhotoView__fade 0.4s linear both; } .PhotoSlider__Wrapper .PhotoSlider__Backdrop.PhotoSlider__fadeOut { opacity: 1; animation: PhotoView__fade 0.4s linear both reverse; } .PhotoSlider__Wrapper .PhotoSlider__BannerWrap { position: absolute; left: 0; top: 0; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; -webkit-box-align: center; -ms-flex-align: center; align-items: center; width: 100%; height: 44px; color: white; background-color: rgba(0, 0, 0, 0.5); -webkit-transition: opacity 0.2s ease-out; transition: opacity 0.2s ease-out; z-index: 20; } @media (any-hover: hover) { .PhotoSlider__Wrapper .PhotoSlider__BannerWrap:hover { opacity: 1; } } .PhotoSlider__Wrapper .PhotoSlider__BannerWrap .PhotoSlider__Counter { padding: 0 10px; font-size: 14px; opacity: 0.75; } .PhotoSlider__Wrapper .PhotoSlider__BannerWrap .PhotoSlider__BannerRight { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; -webkit-box-align: center; -ms-flex-align: center; align-items: center; height: 100%; } .PhotoSlider__Wrapper .PhotoSlider__BannerWrap .PhotoSlider__BannerRight .PhotoSlider__BannerIcon { vertical-align: top; -webkit-box-sizing: border-box; box-sizing: border-box; padding: 10px; opacity: 0.75; cursor: pointer; -webkit-transition: all 0.2s linear; transition: all 0.2s linear; } @media (any-hover: hover) { .PhotoSlider__Wrapper .PhotoSlider__BannerWrap .PhotoSlider__BannerRight .PhotoSlider__BannerIcon:hover { opacity: 1; } } .PhotoSlider__Wrapper .PhotoSlider__PhotoBox { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; -webkit-box-align: center; -ms-flex-align: center; align-items: center; z-index: 10; overflow: hidden; } .PhotoSlider__Wrapper .PhotoSlider__ArrowLeft { left: 0; } .PhotoSlider__Wrapper .PhotoSlider__ArrowRight { right: 0; } .PhotoSlider__Wrapper .PhotoSlider__ArrowLeft, .PhotoSlider__Wrapper .PhotoSlider__ArrowRight { position: absolute; top: 0; bottom: 0; margin: auto 0 auto 0; width: 70px; height: 100px; opacity: 0.7; z-index: 20; cursor: pointer; -webkit-transition: opacity 0.2s linear; transition: opacity 0.2s linear; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; -webkit-box-align: center; -ms-flex-align: center; align-items: center; } @media (any-hover: hover) { .PhotoSlider__Wrapper .PhotoSlider__ArrowLeft:hover, .PhotoSlider__Wrapper .PhotoSlider__ArrowRight:hover { opacity: 1; } } .PhotoSlider__Wrapper .PhotoSlider__ArrowLeft svg, .PhotoSlider__Wrapper .PhotoSlider__ArrowRight svg { -webkit-box-sizing: content-box; box-sizing: content-box; padding: 10px; width: 24px; height: 24px; fill: white; background: rgba(0, 0, 0, 0.3); } .PhotoSlider__Wrapper .PhotoSlider__FooterWrap { position: absolute; left: 0; bottom: 0; -webkit-box-sizing: border-box; box-sizing: border-box; width: 100%; min-height: 44px; padding: 10px; line-height: 1.5; font-size: 14px; text-align: justify; color: #ccc; background-color: rgba(0, 0, 0, 0.5); -webkit-transition: opacity 0.2s ease-out; transition: opacity 0.2s ease-out; z-index: 20; } @media (any-hover: hover) { .PhotoSlider__Wrapper .PhotoSlider__FooterWrap:hover { opacity: 1; } }