UNPKG

zmp-core

Version:

Full featured mobile HTML framework for building iOS & Android apps

74 lines (73 loc) 1.51 kB
// zmp-cover .router-transition-zmp-cover-forward, .router-transition-zmp-cover-backward { background: #000; perspective: 1200px; .page-next, .page-current, .page-previous:not(.stacked) { pointer-events: none; } } .router-transition-zmp-cover-forward { .page-next { animation: zmp-cover-next-to-current var(--zmp-page-cover-transition-duration) forwards; } .page-current { animation: zmp-cover-current-to-prev var(--zmp-page-cover-transition-duration) forwards; } } .router-transition-zmp-cover-backward { .page-current { animation: zmp-cover-current-to-next var(--zmp-page-cover-transition-duration) forwards; } .page-previous { animation: zmp-cover-prev-to-current var(--zmp-page-cover-transition-duration) forwards; } } @keyframes zmp-cover-next-to-current { from { .ltr({ transform: translateX(100%); }); .rtl({ transform: translateX(-100%); }); } to { transform: translateX(0%); } } @keyframes zmp-cover-current-to-next { from { transform: translateX(0%); } to { .ltr({ transform: translateX(100%); }); .rtl({ transform: translateX(-100%); }); } } @keyframes zmp-cover-current-to-prev { from { transform: translateZ(0); opacity: 1; } to { transform: translateZ(-300px); opacity: 0.5; } } @keyframes zmp-cover-prev-to-current { from { transform: translateZ(-300px); opacity: 0.5; } to { transform: translateZ(0); opacity: 1; } }