vue 实现粒子特效(vue-particles)
shell
npm install vue-particles --save
- main.js引入
js
import VueParticles from 'vue-particles'
Vue.use(VueParticles)
- 登录页面使用 login.vue
html
<template>
<div class="box">
<vue-particles
color="#409EFF"
:particleOpacity="0.7"
:particlesNumber="80"
shapeType="circle"
:particleSize="4"
linesColor="#409EFF"
:linesWidth="1"
:lineLinked="true"
:lineOpacity="0.4"
:linesDistance="150"
:moveSpeed="3"
:hoverEffect="true"
hoverMode="grab"
:clickEffect="true"
clickMode="push"
class="lizi"
> </vue-particles>
</div>
</template>