Skip to content

Instantly share code, notes, and snippets.

@n3k0lai
Created March 30, 2016 22:22
Show Gist options
  • Save n3k0lai/0b929916059b77dc75f0726c1c0acefd to your computer and use it in GitHub Desktop.
Save n3k0lai/0b929916059b77dc75f0726c1c0acefd to your computer and use it in GitHub Desktop.
:3
<div id="particles-js">
<div class="cat-cont">
<div id="cat"></div>
<div id="message">Fuck art</div>
</div>
</div>
/* ---- particles.js config ---- */
particlesJS("particles-js", {
"particles": {
"number": {
"value": 80,
"density": {
"enable": true,
"value_area": 800
}
},
"color": {
"value": "#ffffff"
},
"shape": {
"type": "star",
"stroke": {
"width": 0,
"color": "#000000"
},
"polygon": {
"nb_sides": 5
},
"image": {
"src": "img/github.svg",
"width": 100,
"height": 100
}
},
"opacity": {
"value": 1,
"random": false,
"anim": {
"enable": false,
"speed": 1,
"opacity_min": 0.1,
"sync": false
}
},
"size": {
"value": 3,
"random": true,
"anim": {
"enable": false,
"speed": 40,
"size_min": 0.1,
"sync": false
}
},
"line_linked": {
"enable": false
},
"move": {
"enable": true,
"speed": 6,
"direction": "none",
"random": false,
"straight": false,
"out_mode": "out",
"bounce": false,
"attract": {
"enable": false,
"rotateX": 600,
"rotateY": 1200
}
}
},
"interactivity": {
"detect_on": "canvas",
"events": {
"onhover": {
"enable": false
},
"onclick": {
"enable": true,
"mode": "push"
},
"resize": true
},
"modes": {
"grab": {
"distance": 140,
"line_linked": {
"opacity": 1
}
},
"bubble": {
"distance": 400,
"size": 40,
"duration": 2,
"opacity": 8,
"speed": 3
},
"repulse": {
"distance": 200,
"duration": 0.4
},
"push": {
"particles_nb": 4
},
"remove": {
"particles_nb": 2
}
}
},
"retina_detect": true
});
<script src="http://cdn.jsdelivr.net/particles.js/2.0.0/particles.min.js"></script>
/* ---- reset ---- */
body {
margin:0;
font-family: 'Yellowtail', cursive;
}
canvas {
display: block;
vertical-align: bottom;
}
.cat-cont{
position:fixed;
left:0;
bottom:0;
z-index:99;
width:500px;
height:250px;
#cat {
background-image:url("http://36.media.tumblr.com/cef9b11c53ac8ffb10b6b3c21654c777/tumblr_inline_nqm3xfRYhW1qb81eh_500.png");
background-repeat:no-repeat;
background-size: contain;
position:absolute;
bottom:0;
height:250px;
width:360px;
}
#message {
border-radius:30px 30px 30px 0;
font-size:50px;
padding:20px 40px 20px 20px;
position:absolute;
top:0;
right:0;
background-color:black;
color:white;
border:5px solid white;
}
}
/* ---- particles.js container ---- */
#particles-js {
position: absolute;
width: 100%;
height: 100%;
background-color: #000000;
background-image: url("");
background-repeat: no-repeat;
background-size: cover;
background-position: 50% 50%;
}
<link href="https://fonts.googleapis.com/css?family=Yellowtail" rel="stylesheet" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment