Yo : ./style/lib/ani/elastic-x.scss
源代码
源代码
@charset "utf-8"; @import "classes"; /** * @module elastic * @description 定义X轴弹性动画 * @method elastic-x */ @-webkit-keyframes elastic-x { 0%, 20%, 100% { -webkit-transform: translate3d(0, 0, 0); } 30% { -webkit-transform: translate3d(20px, 0, 0); } 50% { -webkit-transform: translate3d(-20px, 0, 0); } 65% { -webkit-transform: translate3d(10px, 0, 0); } 80% { -webkit-transform: translate3d(-10px, 0, 0); } 90% { -webkit-transform: translate3d(5px, 0, 0); } } @keyframes elastic-x { 0%, 20%, 100% { transform: translate3d(0, 0, 0); } 30% { transform: translate3d(20px, 0, 0); } 50% { transform: translate3d(-20px, 0, 0); } 65% { transform: translate3d(10px, 0, 0); } 80% { transform: translate3d(-10px, 0, 0); } 90% { transform: translate3d(5px, 0, 0); } } .ani.elastic-x { -webkit-animation-name: elastic-x; animation-name: elastic-x; }