/** * desc: spa框架样式 * author: justin * date: 2015-05-14 */ html { height: 100%; } body { position: relative; margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; } .spa-fullscreen { position: absolute; left: 0; top: 0; margin: 0; padding: 0; width: 100%; visibility: hidden; overflow: hidden; z-index: -1; } .spa-page { position: absolute; left: 0; top: 0; bottom: 0; right: 0; margin: 0; padding: 0; overflow: hidden; z-index: 2000; -webkit-transform: translateZ(0); -webkit-backface-visibility: hidden; -webkit-transform-style: preserve-3d; } .spa-page-bg { position: absolute; left: 0; top: 0; bottom: 0; right: 0; margin: 0; padding: 0; } .spa-page-body { position: absolute; left: 0; top: 0; bottom: 0; right: 0; margin: 0; padding: 0; overflow: hidden; -webkit-transform: translateZ(0); -webkit-backface-visibility: hidden; -webkit-transform-style: preserve-3d; } .spa-scroll { overflow: auto; } .spa-scroll-touch { -webkit-overflow-scrolling: touch; } .spa-scroll-x { overflow-y: hidden; } .spa-scroll-y { overflow-x: hidden; } .spa-cover { display: none; position: absolute; left: 0; right: 0; top: 0; bottom: 0; text-align: center; z-index: 5000; } .spa-loader { position: absolute; left: 0; right: 0; top: 0; bottom: 0; text-align: center; overflow: hidden; z-index: 5001; } .spa-loader-animate { position: absolute; top: 50%; left: 50%; } .spa-loader-animate .bg { position: absolute; width: 64px; height: 64px; margin: 0 auto; top: -32px; left: -32px; border-radius: 50%; background: #2C3E50; opacity: 0.5; } .spa-loader-animate .ball { display: block; float: left; padding: 8px; margin-top: -8px; margin-left: -10px; -webkit-border-radius: 50%; -moz-border-radius: 50%; -ms-border-radius: 50%; -o-border-radius: 50%; border-radius: 50%; } .spa-loader-animate span:nth-child(2) { background: #16A085; -webkit-animation: move-left 800ms ease-in-out infinite alternate; -moz-animation: move-left 800ms ease-in-out infinite alternate; -ms-animation: move-left 800ms ease-in-out infinite alternate; -animation: move-left 800ms ease-in-out infinite alternate; } .spa-loader-animate .ball:nth-child(3) { background: #E67E22; -webkit-animation: move-right 800ms ease-in-out infinite alternate; -moz-animation: move-right 800ms ease-in-out infinite alternate; -ms-animation: move-right 800ms ease-in-out infinite alternate; animation: move-right 800ms ease-in-out infinite alternate; } @-webkit-keyframes move-left { to { -webkit-transform: translate(20px, 0); transform: translate(20px, 0); background: #e85932; } } @-webkit-keyframes move-right { to { -webkit-transform: translate(-20px, 0); transform: translate(-20px, 0); background: #44bbcc; } }