css背景动画
Background animations are an awesome touch when used correctly. In the past, I used MooTools to animate a background position. Luckily these days CSS animations are widely supported enough to rely on them to take over JavaScript-based animation tasks. The following simple CSS snippet animates the background image (via background position) of a given element.
如果正确使用背景动画,那真是太棒了。 过去,我使用MooTools为背景位置设置动画 。 幸运的是,如今,CSS动画得到了广泛的支持,足以依靠它们来接管基于JavaScript的动画任务。 以下简单CSS代码片段(通过背景位置)为给定元素设置了背景图片动画。