安装依赖
npm install vue-particles --save-dev
main.js
import VueParticles from 'vue-particles' Vue.use(VueParticles)
template
<vue-particles color="#409EFF" :particleOpacity="0.7" :particlesNumber="88" shapeType="circle" :particleSize="6" linesColor="#409EFF" :linesWidth="1" :lineLinked="true" :lineOpacity="0.4" :linesDistance="150" :moveSpeed="3" :hoverEffect="true" hoverMode="grab" :clickEffect="true" clickMode="push"> </vue-particles>
css
#particles-js { width: 100%; height: calc(100% - 100px); position: absolute; }
标签:vue,粒子,100%,js,particles,VueParticles,背景图 From: https://www.cnblogs.com/-llf/p/17287350.html