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,
});
},
};
效果演示: