Implementation of dynamic particle background plugin for Vue login page

Implementation of dynamic particle background plugin for Vue login page

The dynamic particle effects are as follows:

insert image description here

Install the plugin

npm install vue-particles --save-dev

Import globally in main.js file

import VueParticles from 'vue-particles'  
Vue.use(VueParticles)

Use in vue file

 <vue-particles
          color="#409EFF"
          :particleOpacity="0.7"
          :particlesNumber="60"
          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>

Use dynamic particles as the background image. When a new div needs to be presented, you will find that the div cannot cover the vue-particles content and will be displayed later in turn. Therefore, position:absolute is added, and when there is a new div box, it is set to position:relative

<style>
#particles-js {
  width: 100%;
  height: calc(100% - 100px);
  position: absolute;
}
</style>

insert image description here

About the above attributes:

Properties of vue-particles:
color: String type. Default is '#dedede'. The color of the particles.
particleOpacity: Number type. Default is 0.7. Particle transparency.
particlesNumber: Number type. The default value is 80. Number of particles.
shapeType: String type. Default is 'circle'. Available particle appearance types are: "circle", "edge", "triangle", "polygon", "star".
particleSize: Number type. The default value is 80. Individual particle size.
linesColor: String type. Default is '#dedede'. Line color.
linesWidth: Number type. Default is 1. Line width.
lineLinked: Boolean type. Default is true. Is the connection cable available?
lineOpacity: Number type. Default is 0.4. Line transparency.
linesDistance: Number type. The default is 150. Line distance.
moveSpeed: Number type. Default is 3. The speed of particle movement.
hoverEffect: Boolean type. Default is true. Whether there are hover effects.
hoverMode: String type. Default is true. Available hover modes are: "grab", "repulse", "bubble".
clickEffect: Boolean type. Default is true. Whether there is a click effect.
clickMode: String type. Default is true. Available click modes are: "push", "remove", "repulse", "bubble"

This is the end of this article about the implementation of the dynamic particle background plug-in for the Vue login page. For more related Vue dynamic particle background content, please search 123WORDPRESS.COM's previous articles or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Vue implements the background particle effects of the login page
  • Detailed explanation of how to use the particles plug-in to implement particle background in Vue3
  • Using particles in the vue project to achieve particle background effects and the pitfalls encountered (buttons do not respond to clicks)
  • Vue particle effects sample code
  • Vue realizes starry sky effect

<<:  mysql-8.0.16 winx64 latest installation tutorial with pictures and text

>>:  How to install a virtual machine with Windows services on Mac

Recommend

js Promise concurrent control method

Table of contents question background Idea & ...

MySQL storage engine basics

In the previous article, we talked about MySQL tr...

W3C Tutorial (12): W3C Soap Activity

Web Services are concerned with application-to-ap...

How to install the latest version of docker using deepin apt command

Step 1: Add Ubuntu source Switch to root su root ...

How to install theano and keras on ubuntu system

Note: The system is Ubuntu 14.04LTS, a 32-bit ope...

jQuery implements ad display and hide animation

We often see ads appear after a few seconds and t...

MySQL 8.0 DDL atomicity feature and implementation principle

1. Overview of DDL Atomicity Before 8.0, there wa...

Ajax responseText parses json data case study

Solve the problem that the responseText returned ...

Docker /var/lib/docker/aufs/mnt directory cleaning method

The company's service uses docker, and the di...

Front-end vue+express file upload and download example

Create a new server.js yarn init -y yarn add expr...

HTML+CSS to achieve responsive card hover effect

Table of contents accomplish: Summarize: Not much...

How to use VUE to call Ali Iconfont library online

Preface Many years ago, I was a newbie on the ser...

Steps to deploy ingress-nginx on k8s

Table of contents Preface 1. Deployment and Confi...