<!-- tsParticles container -->
<div id="tsparticles"></div>
<!-- tsParticles lib - https://github.com/matteobruni/tsparticles -->
/* ---- reset ---- */
body {
  margin: 0;
  font: normal 75% Arial, Helvetica, sans-serif;
}
canvas {
  display: block;
  vertical-align: bottom;
}
/* ---- tsparticles container ---- */
#tsparticles {
  position: absolute;
  width: 100%;
  height: 100%;
}
tsParticles.addPreset("random-stroke", {
  fpsLimit: 60,
  particles: {
    color: {
      value: "random"
    },
    stroke: {
      color: {
        value: "random"
      },
      width: 1
    }
  }
});

tsParticles.addPreset("no-links", {
  particles: {
    lineLinked: {
      enable: false
    }
  }
});

tsParticles.addPreset("rotating", {
  particles: {
    rotate: {
      random: true,
      direction: "clockwise",
      animation: {
        enable: true,
        speed: 10,
        sync: false
      }
    }
  }
});

tsParticles.load("tsparticles", {
  particles: {
    size: {
      value: 20
    },
    shape: {
      type: ["spiral", "heart"],
      custom: {
        spiral: {
          innerRadius: 1,
          lineSpacing: 1,
          fill: false,
          close: false
        }
      }
    }
  },
  preset: ["basic", "random-stroke", "no-links", "rotating"],
  background: {
    color: "#000"
  }
});

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdn.jsdelivr.net/npm/tsparticles@1.17.0-beta.7/dist/tsparticles.min.js
  2. https://cdn.jsdelivr.net/npm/tsparticles-shape-spiral@1.2.0-beta.7/dist/tsparticles.shape.spiral.min.js
  3. https://cdn.jsdelivr.net/npm/tsparticles-preset-basic@1.2.0-beta.7/dist/tsparticles.preset.basic.min.js
  4. https://cdn.jsdelivr.net/npm/tsparticles-shape-heart@1.2.0-beta.7/dist/tsparticles.shape.heart.min.js