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="loader_wrapper">
	<svg class="loader_img" xmlns="http://www.w3.org/2000/svg" id="Layer_1" data-name="Layer 1" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 100 100">
  <defs>
    <style>
      .cls-1, .cls-2, .cls-5 { fill: none; } 
			.cls-1, .cls-2 { stroke: #999; stroke-linecap: round; stroke-miterlimit: 10; } 				
			.cls-1 { stroke-width: 3px; } 
			.cls-2, .cls-5 { stroke-width: 4px; } 
			.cls-3 { fill: #fff; } 
			.cls-4 { fill: #ccc; opacity: 0.5; } 
			.progress { stroke: red; stroke-linejoin: round; stroke-linecap: round; }
			.progress2 { fill: none; stroke-width: 6px;}
			.hamsterFill { fill: #999}
    </style>
    <symbol id="hamster" data-name="hamster" viewBox="0 0 80 38">
      <g id="hamster-3" data-name="hamster">
        <path id="frontleg" d="M53 25l5 5" class="legs cls-1"/>
        <path id="backLeg" d="M10 33l5-5" class="legs cls-2"/>
        <path class="hamsterFill" id="body" d="M64 4c-5-4-13-4-16-3l-6 4c-2 1-11 5-25 1-1-1-11-1-15 8a13 13 0 0 0 4 16c25 17 49 4 58-10s2-15 0-16z"/>
        <circle class="hamsterFill" id="tail" cx="2" cy="14" r="2"/>
        <circle class="hamsterFill" id="ear" cx="45" cy="3" r="3"/>
        <path id="eye" d="M55 5a2 2 0 0 1 3 3 2 2 0 0 1-3-3z" class="cls-3"/>
      </g>
    </symbol>
  </defs>
  <path id="wheel" d="M85 15a49 49 0 0 0-70 70 49 49 0 1 0 70-70zm-64 6a41 41 0 0 1 58 0l5 6-34 21-35-20zM9 50a41 41 0 0 1 4-18l35 19v40A41 41 0 0 1 9 50zm70 29a41 41 0 0 1-27 12V51l34-20a41 41 0 0 1-7 48z" class="cls-4"/>
  <use id="whisky" width="80" height="37.58" xlink:href="#hamster"/>
	<g class="progressGroup">
  	<circle id="progress" cx="50" cy="50" r="45" class="progress progress1 cls-5" transform="rotate(-90 50 50)"/>
  	<circle cx="50" cy="50" r="45" class="progress progress2" transform="rotate(-90 50 50)"/>
	</g>
</svg>
</div>

              
            
!

CSS

              
                
// General
// ---------------------------------

html, body {
	height: 100%;
}
.loader {
	&_wrapper {
		height: 100%;
		display: flex;
		align-items: center;
		justify-content: center;
	}
	&_img {
		width: 200px;
	}
}

// Animations
// ---------------------------------
.progressGroup {
	animation: 30s linear 1s infinite ProgressOpacity;
	opacity: 0.25;
}
.progress {
	animation: 1.5s ease-in-out infinite alternate Pulse;
}
.progress1 {
	animation: 30s linear 1s infinite Progress1;
	stroke-dasharray: 0 1000;
}
.progress2 {
	animation: 30s linear 1s infinite Progress2;
	stroke-dasharray: 0 0 1 1000;
	display: none;
}

@keyframes ProgressOpacity {
	to { 
		opacity: 1;
	}
}
@keyframes Progress1 {
	to {  stroke-dasharray: 280 1000; }
}
@keyframes Progress2 {
	to {  stroke-dasharray: 0 280 1 1000; }
}
@keyframes Pulse {
	to { stroke: #ff6600; }
}

// ---------------
#wheel {
	animation: 1.5s linear infinite Spin;
	transform: rotate(0deg);
	transform-origin: 50px 50px;
}
@keyframes Spin {
	to { transform: rotate(360deg); }
}

// ---------------
#whisky {
	animation: 1.5s ease-in-out infinite alternate Rock;
	transform: rotate(20deg) translate(18px,49px);
	transform-origin: 50px 50px;
}
@keyframes Rock {
	to { transform: rotate(-20deg) translate(18px,49px); }
}

// --------------
.legs {
	transform-origin: 40px -40px;
	transform: translatex(1px) rotate(2deg);
	animation: 0.25s ease-in-out infinite alternate Wiggle;
}
@keyframes Wiggle {
	50% { transform: translatex(-1px) rotate(-2deg); }
}
              
            
!

JS

              
                
              
            
!
999px

Console