vue 使用gsap(TweenMax)
第一步 npm install gsap之后页面中引用import {TweenMax, gsap,TweenLite} from 'gsap'可以watch监听属性:(这是图片旋转)// TweenMax.to(this.$data, { duration: 0.5, tweenedNumber: newValue });// TweenLite.to("#m_left", 1, {width:
·
第一步 npm install gsap
之后页面中引用
import {TweenMax, gsap,TweenLite} from 'gsap'
可以watch监听属性:(这是图片旋转)
// TweenMax.to(this.$data, { duration: 0.5, tweenedNumber: newValue });
// TweenLite.to("#m_left", 1, {width: 100});
// TweenLite.to("#m_i", 1, {width: 100});
// this.$refs.m_left
TweenMax.from('#m_i', 1, {
scale: 1,
});
console.log(1111,newValue);
if(newValue == 24){
TweenMax.to('#m_i', 1, {
rotation: 0,
});
}else{
TweenMax.to('#m_i', 1, {
rotation: 90,
});
}
TweenMax.from('h1', 3, {
scale: 0,
rotation: -360,
y: 300,
letterSpacing: '200px'
});
TweenMax.to('h1', 2, {
opacity: 0,
delay: 3
});
更多推荐
已为社区贡献1条内容
所有评论(0)