【发布时间】:2017-08-11 21:08:23
【问题描述】:
我正在尝试复制粒子在加载此页面时向前爆炸的动画效果:http://vincentgarreau.com/particles.js/
这是我的 HTML:
<div class="container-fluid">
<div id="particles-js">
<canvas class="particles-js-canvas-el">
</div>
<script src="https://cdn.jsdelivr.net/particles.js/2.0.0/particles.min.js"></script>
<script>
particlesJS.load('particles-js', 'assets/particles.json', function () {
console.log('particles.json loaded...');
});
</script>
</div>
还有我的 CSS:
#particles-js {
position: absolute;
width: 100%;
height: 100%;
background-color: #000;
background-image: url("");
background-repeat: no-repeat;
background-size: cover;
background position: 50% 50%;
left: 0px;
}
canvas {
width: 100%;
height: 100%;
display: block;
vertical-align: bottom;
}
#particles-js .particles-js-canvas-el {
-ms-transform: scale(1);
-webkit-transform: scale(1);
transform: scale(1);
opacity: 1;
-webkit-animation: appear 1.4s 1;
animation: appear 1.4s 1;
-webkit-animation-fill-mode: forwards;
animation-fill-mode: forwards
}
很遗憾,我没有收到任何动画响应。
我将不胜感激任何对此问题的见解!谢谢
【问题讨论】:
标签: javascript css animation css-animations particles