Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

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.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div class="container">

	<svg class="svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 600">
		<defs id="defs">
		</defs>
		<g class="shapes" fill="#fff" stroke="#000" stroke-miterlimit="10" stroke-width="2" >
			<polygon points="400.05 51.73 155.04 476.08 645.04 476.08 400.05 51.73" />
			<polygon points="399.99 63.24 165 470.26 634.99 470.26 399.99 63.24" />
			<polygon points="399.99 74.78 175 464.49 624.99 464.49 399.99 74.78" />
			<polygon points="399.99 86.33 185 458.72 614.99 458.72 399.99 86.33" />
			<polygon points="399.99 97.88 195 452.94 604.99 452.94 399.99 97.88" />
			<polygon points="399.99 109.43 205 447.17 594.99 447.17 399.99 109.43" />
			<polygon points="399.99 120.97 214.99 441.4 585 441.4 399.99 120.97" />
			<polygon points="399.99 132.52 224.99 435.63 574.99 435.63 399.99 132.52" />
			<polygon points="400 144.07 235 429.86 565 429.86 400 144.07" fill="#fff" />
			<polygon points="399.99 155.64 244.99 424.11 554.99 424.11 399.99 155.64" />
			<polygon points="400 167.2 255 418.35 545 418.35 400 167.2" fill="#fff" />
			<polygon points="400 178.73 265 412.56 535 412.56 400 178.73" fill="#fff" />
			<polygon points="400 190.29 275 406.8 525 406.8 400 190.29" fill="#fff" />
			<polygon points="400.01 201.96 285.01 401.14 515.01 401.14 400.01 201.96" fill="#fff" />
			<polygon points="400.05 213.39 295.05 395.25 505.05 395.25 400.05 213.39" fill="#fff" />
			<polygon points="400.05 224.99 305.05 389.53 495.05 389.53 400.05 224.99" fill="#fff" />
			<polygon points="400.05 236.53 315.05 383.75 485.05 383.75 400.05 236.53" fill="#fff" />
			<polygon points="400.1 247.75 324.85 378.08 475.35 378.08 400.1 247.75" fill="#fff" />
			<polygon points="400.1 259.58 335.1 372.17 465.1 372.17 400.1 259.58" fill="#fff" />
			<polygon points="400 271.23 345 366.49 455 366.49 400 271.23" fill="#fff" stroke="#000" />
			<polygon points="400 282.78 355 360.72 445 360.72 400 282.78" fill="#fff" stroke="#000" />
			<polygon points="400 294.32 365 354.94 435 354.94 400 294.32" fill="#fff" stroke="#000" />
			<polygon points="400 305.87 375 349.17 425 349.17 400 305.87" fill="#fff" stroke="#000" />
			<polygon points="400 317.42 385 343.4 415 343.4 400 317.42" fill="#fff" stroke="#000" />
			<polygon points="400 329.07 395.09 337.57 404.91 337.57 400 329.07" fill="#fff" stroke="#000" />
		</g>
	</svg>


</div>

<div class="me">
	<a class="me__link portfolio" href="http://www.petebarr.com" target='_blank'>Petebarr.com<span></span></a>

</div>
<a class="twitter" href="https://twitter.com/petebarr" target='_blank'>
	<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 52 52">
		<path fill="#fff" d="M39.19 15.39a10.63 10.63 0 0 1-3.38 1.29 5.31 5.31 0 0 0-9.19 3.63 5.43 5.43 0 0 0 .14 1.22A15.11 15.11 0 0 1 15.8 16a5.39 5.39 0 0 0-.72 2.68 5.32 5.32 0 0 0 2.37 4.42 5.33 5.33 0 0 1-2.45-.7v.07a5.31 5.31 0 0 0 4.27 5.21 5.45 5.45 0 0 1-1.41.19 4.78 4.78 0 0 1-1-.1 5.32 5.32 0 0 0 5 3.69 10.64 10.64 0 0 1-6.6 2.28c-.43 0-.85 0-1.27-.07a15.13 15.13 0 0 0 23.28-12.74v-.69a10.87 10.87 0 0 0 2.66-2.75 10.84 10.84 0 0 1-3.06.84 5.35 5.35 0 0 0 2.34-2.94"></path>
<!-- 		<path fill="#fff" d="M26 5A21 21 0 1 1 5 26 21 21 0 0 1 26 5m0-4a25 25 0 1 0 25 25A25 25 0 0 0 26 1z"></path> -->
	</svg>
</a>
              
            
!

CSS

              
                body {
	background-color:#b3b0a8;
}

body,
html {
	height: 100%;
	width: 100%;
	margin: 0;
	padding: 0;
}

#slider{
	width:300px;
	position:relative;
	margin: 30px auto;
}

.container {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 800px;
	height: 600px;
	border-radius: 10px;
	background-color: white;
}


.me {
	position: absolute;
	z-index: 1000;
	top: 24px;
	left: 24px;
	display: flex;
	flex-direction: column;
}

.me__link {
	position: relative;
	margin-bottom: 16px;
	color: white;
	font-family: Helvetica, sans-serif;
	text-decoration: none;
	font-size: 16px;

	span {
		display: block;
		position: absolute;
		bottom: -3px;
		left: 0;
		height: 1px;
		width: 5%;
		background-color: white;
		content: "";
		transition: width 0.3s;
	}

	&:hover span{
		width: 100%;
	}
}

.twitter {
	position: fixed;
	top: 16px;
	right: 24px;
	display: block;
	width: 40px;
	height: 40px;
}
              
            
!

JS

              
                var NS = "http://www.w3.org/2000/svg";
var defs = document.getElementById("defs");
var $shapes = $('polygon');
var $shapesAlt = $shapes.get().reverse();
var numEl = $shapes.length;
var time = 0.25;

$shapes.each(function(index) {
	var filter = document.createElementNS( NS, "filter" );
	filter.setAttribute( "id", "b"+(index+1) );

	var blur = document.createElementNS( NS, "feGaussianBlur" );
	blur.setAttribute( "stdDeviation", (numEl-(index+1))/(numEl/8+index/2) );

	filter.appendChild( blur );
	defs.appendChild( filter );
	$(this)[0].setAttribute( "filter", "url(#b"+(index+1)+")" );
})

TweenMax.set( '.shapes', { rotation: -68, x: -64, y: 50, transformOrigin: "50% 50%" } )

TweenMax.set('svg', {
	visibility: 'visible'
});

TweenMax.staggerTo($shapesAlt, 0, { 
	cycle: {
		rotation: function(i) {
			radians = (360/numEl * (i) * (Math.PI/180))*0.7;
			return -((Math.cos(radians)*30) - i*2); // increase amplitide minus offset
		}
	},
	transformOrigin: "50% 66.666667%"
} )

TweenMax.staggerTo( $shapesAlt, time, { 
	cycle: {
		rotation: function(i) {
			return "+=15"; // waggle it!
		}
	},
	ease: Sine.easeInOut,
	yoyo: true,
	repeat: -1
}, time/15 )



              
            
!
999px

Console