import scrollReveal from 'scrollreveal';
export default {
name: "Main",
data() {
return {
scrollReveal: scrollReveal()
}
},
mounted() {
this.scrollReveal.reveal('.reveal-scale', {
// 动画的时长
duration: 1000,
// 延迟时间
delay: 200,
// 动画开始的位置,'bottom', 'left', 'top', 'right'
// origin: 'top',
// 回滚的时候是否再次触发动画
reset: false,
// 在移动端是否使用动画
mobile: false,
// 滚动的距离,单位可以用%,rem等
// distance: '200px',
// 其他可用的动画效果
opacity: 0.001,
easing: 'linear',
scale: 0.8,
});
},
};
效果演示: