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 Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

Quick-add: + add another resource

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

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.

            
              <h1 class='title'>Swarming Fungi</h1>
<p class='instructions'>Hover in the petri dish to have the fungi swarm after your delicious cursor.</p>
<div class='grid'>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='grid__square'></div>
  <div class='flocker'></div>
  <div class='flocker'></div>
  <div class='flocker'></div>
  <div class='flocker'></div>
  <div class='flocker'></div>
  <div class='flocker'></div>
  <div class='flocker'></div>
  <div class='flocker'></div>
  <div class='flocker'></div>
  <div class='flocker'></div>
  <div class='flocker'></div>
  <div class='flocker'></div>
  <div class='flocker'></div>
  <div class='flocker'></div>
  <div class='flocker'></div>
  <div class='flocker'></div>
  <div class='flocker'></div>
  <div class='flocker'></div>
  <div class='flocker'></div>
  <div class='flocker'></div>
</div>
            
          
!
            
              @import bourbon
@import url(https://fonts.googleapis.com/css?family=Montserrat)
	
=block($w, $h)
	display: block
	width: $w
	height: $h

$grid-size: 70vh

$background: #87cdd4
$dish: #fffede
$mold: #fb7aa3
$accent: #f8a967
$text: white
$accent2: gold

body
	background-color: $background
	font-family: 'Montserrat', sans-serif

.title
	color: $dish
	text-align: center
	padding: 4vh 0 2vh
	font-size: 5vh
	
.instructions
	color: $text
	opacity: .75
	text-align: center
	width: 60vw
	margin-left: 20vw
	font-size: 1em
	line-height: 1.5

.grid
	+block($grid-size, $grid-size)
	background: $dish
	margin: 0 auto
	position: relative
	border-radius: 50%
	margin-top: 4.5vh
	overflow: hidden
	transform-style: preserve-3d
	border: 1vh solid $accent2
	
.grid__square
	box-sizing: border-box
	+block($grid-size/10, $grid-size/10)
	float: left
	cursor: pointer
	position: relative
	z-index: 2

.flocker
	+block($grid-size/10, $grid-size/10)
	background: $mold
	border-radius: 50%
	position: absolute
	z-index: 1
	will-change: transform

@for $i from 1 through 20
	.flocker:nth-child(#{$i + 100})
		+transform(rotate((360/20) * $i + 0deg) translateY(20vh))
		+transform-origin($grid-size/2 $grid-size/2)
		transition: all 1.7s linear

@for $y from 0 through 9
	@for $x from 1 through 5
		.grid__square:nth-child(#{($y*10 + $x)}):hover
			&~.flocker
				+transform(translateX(($x - 1) * $grid-size/10) translateY($y * $grid-size/10))
			@for $j from 1 through 20
				&~.flocker:nth-child(#{$j + 100})
					transition-duration: (random(200)/100 + .5s)
		$x2: $x + 5
		.grid__square:nth-child(#{($y*10 + $x2)}):hover
			&~.flocker
				+transform(translateX(($x2 - 1) * $grid-size/10) translateY($y * $grid-size/10))
			@for $j from 1 through 20
				&~.flocker:nth-child(#{$j + 100})
					transition-duration: (random(200)/100 + .5s)
            
          
!
999px
Loading ..................

Console