cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              <html>
<head>
	<meta charset="utf-8">
</head>
  <body>
    <div class="title-wrap">
			<h1>Lorem ipsum dolor sit.</h1>			
			<a class="btn-header" 
         target="_blank" 
         href="http://tsumbaluk.in.ua/blog/particles-js-chto-eto-takoe">button1</a>
			<a class="btn-header" 
         target="_blank" 
         href="http://it-24.pro/">button2</a>
		</div>
    <div id="particles-js"></div>
  </body>
</html>
            
          
!
            
              $main: #2cbc99
$white: #fff
$black: #111

body
  font-family: sans-serif
  background-color: $black
  line-height: 1.5

#particles-js
  position: absolute
  width: 100%
  height: 99%
  top: 0
  left: 0
  background-color: $main
  z-index: -1

.title-wrap
  position: absolute
  width: 100%
  left: 50%
  max-width: 400px
  text-align: center
  color: white
  top: 50%
  transform: translate(-50%,-50%)
.btn-header
  display: inline-block
  width: 150px
  text-decoration: none
  padding: 5px
  text-align: center
  border: 1px solid $white
  margin: 15px 5px
  color: $white	
  transition: all 0.3s
  &:hover
    color: $main
    background-color: $white	
  
            
          
!
            
              $(document).ready(function() {
  particlesJS('particles-js',		
  {
    "particles": {
      "number": {
        "value": 60,
        "density": {
          "enable": true,
          "value_area": 800
        }
      },
      "color": {
        "value": "#fff"
      },
      "shape": {
        "type": "circle",
        "stroke": {
          "width": 0,
          "color": "#000000"
        },
        "polygon": {
          "nb_sides": 5
        },
        "image": {
          "src": "img/github.svg",
          "width": 100,
          "height": 100
        }
      },
      "opacity": {
        "value": 0.5,
        "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": true,
        "distance": 150,
        "color": "#fff",
        "opacity": 0.4,
        "width": 1
      },
      "move": {
        "enable": true,
        "speed": 4,
        "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,
          "mode": "repulse"
        },
        "onclick": {
          "enable": false,
          "mode": "push"
        },
        "resize": true
      },
      "modes": {
        "grab": {
          "distance": 400,
          "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
  });
});
            
          
!
999px
Loading ..................

Console