【发布时间】:2016-10-19 15:01:04
【问题描述】:
我有一个使用美钞GSAP Tween platform 制作动画的精灵。恶意包含 7 个不同的图像,然后用于创建动画。 sprite 上的每个图像的大小为 1000px x 1000px。
这是下面的代码。
HTML
<div id="animate-wrapper">
<img src="test.svg">
</div>
CSS
#animate-wrapper {
height: 1000px;
width: 1000px;
overflow: hidden;
}
#animate-wrapper img {
height: 100%;
width: 700%;
}
JS
var animateTongueOut = new TimelineMax({paused: true});
var easeTongueOut = new SteppedEase(6);
animateTongueOut.to('#animate-wrapper img', 1, {
x: '-6000px',
ease: easeTongueOut
})
【问题讨论】:
标签: css responsive-design sprite css-sprites gsap