<!-- tsParticles container -->
<div id="tsparticles"></div>
<!-- tsParticles lib - https://github.com/matteobruni/tsparticles -->
<!-- jquery-particles 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%;
background-color: #0d47a1;
background-image: url("");
background-repeat: no-repeat;
background-size: cover;
background-position: 50% 50%;
}
/* exists $('#tsparticles').particles().ajax('json url'); too */
$("#tsparticles")
.particles()
.init({
fps_limit: 60,
interactivity: {
detect_on: "canvas",
events: {
onclick: { enable: true, mode: "push" },
onhover: {
enable: true,
mode: "repulse",
parallax: { enable: false, force: 60, smooth: 10 }
},
resize: true
},
modes: {
bubble: {
distance: 400,
duration: 2,
opacity: 0.8,
size: 40,
speed: 3
},
grab: { distance: 400, line_linked: { opacity: 1 } },
push: { particles_nb: 4 },
remove: { particles_nb: 2 },
repulse: { distance: 200, duration: 0.4 }
}
},
particles: {
color: { value: "#ffffff" },
line_linked: {
color: "#ffffff",
distance: 150,
enable: true,
opacity: 0.4,
width: 1
},
move: {
attract: { enable: false, rotateX: 600, rotateY: 1200 },
bounce: false,
direction: "none",
enable: true,
out_mode: "out",
random: false,
speed: 2,
straight: false
},
number: { density: { enable: true, value_area: 800 }, value: 80 },
opacity: {
anim: { enable: false, opacity_min: 0.1, speed: 1, sync: false },
random: false,
value: 0.5
},
shape: {
character: {
fill: false,
font: "Verdana",
style: "",
value: "*",
weight: "400"
},
image: {
height: 100,
replace_color: true,
src: "images/github.svg",
width: 100
},
polygon: { nb_sides: 5 },
stroke: { color: "#000000", width: 0 },
type: "circle"
},
size: {
anim: { enable: false, size_min: 0.1, speed: 40, sync: false },
random: true,
value: 5
}
},
polygon: {
draw: { enable: false, lineColor: "#ffffff", lineWidth: 0.5 },
move: { radius: 10 },
scale: 1,
type: "none",
url: ""
},
retina_detect: true
});
This Pen doesn't use any external CSS resources.