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

              
                -# Inspired by [Matthias Martin] (https://codepen.io/roydigerhund/pen/ZWvPbj/)
.frame
	  -for i in (1..50)
		  div class="circle circle-#{i}"
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Open+Sans:700,300);

// settings
$frame-size: 500px;

body {
	position: relative;
	background: #8D19BD;
	overflow: hidden;
}

.frame {
	@include translateCenter;
  width: $frame-size;
  height: $frame-size;
	
	background: #9b59b6;
	overflow: hidden;
  
	border-radius: 50%;
	box-shadow: 1px 100px 40px -10px rgba(0, 0, 0, 0.12);
	
  color: #fff;
	font-family: 'Open Sans', Helvetica, sans-serif;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	
	@include noflicker;
	transform: translate(-50%, -50%) rotateX(10deg);
	animation: hover 16s ease-in-out 3s infinite alternate;
	
	&:after {
		content: '';
		@include positionCenter;
		
		width: 100%;
		height: 100%;
	}
}

.circle {
	@include positionCenter;

	width: 50%;
	height: 50%;
	
	border-radius: 50%;
	border: 2px dotted #fff;
	
	// force HA
	@include noflicker;
	transform-origin: 50% 50%;
}

@for $i from 1 through 50 {
	.circle-#{$i} {
		animation: circle 10s ease-in-out ($i / -5)+s infinite both;
		z-index: $i;
	}
}

@keyframes circle {
	0% {
		transform: scale(0) translate(0px, -200px);
		opacity: 0.4;
	}
	100% {
		transform: scale(2.5) translate(0, 0);
		opacity: 1;
	}
}

@keyframes hover {
	0% {
		transform: translate(-50%, -50%) rotateX(10deg);
		box-shadow: 1px 100px 40px -10px rgba(0, 0, 0, 0.12);
	}
	
	30% {
		transform: translate(-50%, -50%) rotateX(60deg);
		box-shadow: 1px 120px 30px -20px rgba(0, 0, 0, 0.2);
	}
	
	100% {
		transform: translate(-50%, -70%) rotateX(80deg) scale(1.1);
		box-shadow: 1px 100px 50px 0px rgba(0, 0, 0, 0.3);
	}
}

              
            
!

JS

              
                
              
            
!
999px

Console