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

              
                <a class="logo" href="http://basekit.com">
	<svg width="410px" height="120px" viewBox="0 0 410 120" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
		<path d="M173.24,87 C183.48,87 188.76,80.6 188.76,72.52 C188.76,65.88 184.28,60.36 178.52,59.48 C183.56,58.44 187.72,53.88 187.72,47.24 C187.72,40.12 182.52,33.64 172.36,33.64 L144.28,33.64 L144.28,87 L173.24,87 Z M169.88,54.84 L155.64,54.84 L155.64,43.64 L169.88,43.64 C173.72,43.64 176.12,45.96 176.12,49.24 C176.12,52.68 173.72,54.84 169.88,54.84 L169.88,54.84 Z M170.36,77 L155.64,77 L155.64,64.84 L170.36,64.84 C174.76,64.84 177.16,67.56 177.16,70.92 C177.16,74.76 174.6,77 170.36,77 L170.36,77 Z M229.52,87 L229.52,62.04 C229.52,50.92 221.44,47.4 212.56,47.4 C206.48,47.4 200.4,49.24 195.68,53.48 L199.68,60.6 C202.88,57.64 206.72,56.04 210.8,56.04 C215.92,56.04 219.28,58.6 219.28,62.52 L219.28,67.4 C216.72,64.36 212.24,62.68 207.04,62.68 C200.88,62.68 193.68,66.04 193.68,75.16 C193.68,83.8 200.88,87.96 207.04,87.96 C212.08,87.96 216.64,86.12 219.28,82.92 L219.28,87 L229.52,87 Z M211.12,81.08 C207.12,81.08 203.84,79 203.84,75.32 C203.84,71.64 207.12,69.48 211.12,69.48 C214.4,69.48 217.6,70.68 219.28,72.92 L219.28,77.72 C217.6,79.96 214.4,81.08 211.12,81.08 L211.12,81.08 Z M252.44,87.96 C263.16,87.96 269.24,82.76 269.24,75.64 C269.24,60.04 246.28,64.84 246.28,59.16 C246.28,57 248.68,55.4 252.36,55.4 C257.08,55.4 261.48,57.48 263.8,59.88 L267.88,52.68 C264.04,49.64 258.84,47.4 252.36,47.4 C242.12,47.4 236.52,53.08 236.52,59.56 C236.52,74.76 259.4,69.56 259.4,75.88 C259.4,78.28 257.32,79.96 252.92,79.96 C248.12,79.96 242.44,77.32 239.56,74.6 L235.16,81.96 C239.24,85.72 245.72,87.96 252.44,87.96 L252.44,87.96 Z M293.84,87.96 C299.84,87.96 305.92,86.12 309.76,82.6 L305.2,75.88 C302.72,78.28 298.24,79.64 294.96,79.64 C288.4,79.64 284.56,75.72 283.84,71 L312.56,71 L312.56,68.6 C312.56,56.04 304.8,47.4 293.2,47.4 C281.52,47.4 273.2,56.44 273.2,67.64 C273.2,80.04 282.08,87.96 293.84,87.96 L293.84,87.96 Z M302.8,63.96 L283.76,63.96 C284.16,60.12 286.88,55.72 293.2,55.72 C299.92,55.72 302.48,60.28 302.8,63.96 L302.8,63.96 Z M364.84,87 L342.2,58.68 L363.4,33.64 L349.4,33.64 L330.52,57.4 L330.52,33.64 L319.16,33.64 L319.16,87 L330.52,87 L330.52,70.6 L334.68,65.56 L350.84,87 L364.84,87 Z M373.84,44.2 C377.2,44.2 379.92,41.48 379.92,38.12 C379.92,34.76 377.2,32.12 373.84,32.12 C370.56,32.12 367.84,34.76 367.84,38.12 C367.84,41.48 370.56,44.2 373.84,44.2 L373.84,44.2 Z M378.96,87 L378.96,48.36 L368.8,48.36 L368.8,87 L378.96,87 Z M401,87.96 C405.24,87.96 407.96,86.84 409.48,85.48 L407.32,77.72 C406.76,78.36 405.32,78.92 403.8,78.92 C401.56,78.92 400.28,77.08 400.28,74.6 L400.28,57.24 L408.12,57.24 L408.12,48.36 L400.28,48.36 L400.28,37.8 L390.12,37.8 L390.12,48.36 L383.72,48.36 L383.72,57.24 L390.12,57.24 L390.12,77.32 C390.12,84.28 393.88,87.96 401,87.96 L401,87.96 Z" id="BaseKit" fill="#ffffff"></path>
		<path d="M0,0 L120,0 L120,120 L0,120 L0,0 Z M49.824,86 C59.652,86 64.956,79.994 64.956,71.882 C64.956,65.564 60.51,60.026 54.894,59.168 C59.73,58.154 63.942,53.708 63.942,47.234 C63.942,39.902 58.716,33.974 49.122,33.974 L23.538,33.974 L23.538,86 L49.824,86 Z M47.328,55.424 L32.664,55.424 L32.664,42.008 L47.328,42.008 C51.93,42.008 54.582,44.894 54.582,48.716 C54.582,52.694 51.93,55.424 47.328,55.424 Z M47.718,77.966 L32.664,77.966 L32.664,63.458 L47.718,63.458 C52.866,63.458 55.596,66.812 55.596,70.712 C55.596,75.236 52.632,77.966 47.718,77.966 Z M97.432,86.026 L74.656,58.492 L95.794,34 L84.484,34 L64.126,58.726 L68.728,64.03 L86.122,86.026 L97.432,86.026 Z" id="BK" fill="#ffffff"></path>
	</svg>
</a>
<div class="content">
	<svg id="svg" width="800px" height="600px" viewBox="-100 -100 800 600" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
		<rect   id="background" fill="none" x="0" y="0" width="600" height="400"></rect>
		<rect   id="device" fill="#1D1D1D" x="0" y="0" width="600" height="400" rx="20"></rect>
		<rect   id="background_editor" fill="#313131" x="30" y="30" width="540" height="340"></rect>
		<rect   id="background_canvas" fill="#EDEDED" x="145" y="70" width="400" height="300"></rect>
		<rect   id="toolbar_main" fill="#1168C0" x="30" y="30" width="540" height="40"></rect>
		<rect   id="toolbar_canvas" fill="#157AD4" x="145" y="40" width="400" height="30"></rect>
		<circle id="button_add" fill="#FF260B" cx="545" cy="345" r="20"></circle>
	</svg>
</div>


              
            
!

CSS

              
                body {
	display: flex;
	display: -webkit-flex;
	justify-content: center;
	align-items: center;
	margin: 0;
	background: #3F8CDC;
}

body, a {
	font-family: 'Montserrat', sans-serif;
	font-weight: 700;
	text-align: center;
	color: #ffffff;
	-webkit-font-smoothing: antialiased;
	text-decoration: none;
}

svg {
	max-width: 100%;
	height: 100vh;
}

.logo {
	position: absolute;
	top: 0;
	left: 0;
	padding: 20px;
	max-width: 160px;
	svg {
		height: auto;
	}
}

@media (max-width: 740px) {
	.logo {
		max-width: 25%;
	}
}
              
            
!

JS

              
                // Selected elements
var background			= document.querySelector('#background');
var device				= document.querySelector('#device');
var background_editor	= document.querySelector('#background_editor');
var background_canvas	= document.querySelector('#background_canvas');
var toolbar_main		= document.querySelector('#toolbar_main');
var toolbar_canvas		= document.querySelector('#toolbar_canvas');
var button_add			= document.querySelector('#button_add');
var easing				= Back.easeOut;
var delay				= "0.5";
var transitionduration	= "0.5";

// Animation
var editoranimation = new TimelineMax({ repeat: -1});
editoranimation.timeScale(1)

// Frame 1
.to(device, transitionduration, {
	delay: delay,
	attr: {
		x:70,
		y:20,
		width:460,
		height:360,
		rx:20,
	},
	ease: easing
}, "frame1")

.to(background_editor, transitionduration, {
	delay: delay,
	attr: {
		x:110,
		y:50,
		width:380,
		height:300
	},
	ease: easing
}, "frame1")

.to(background_canvas, transitionduration, {
	delay: delay,
	attr: {
		x:204,
		y:90,
		width:260,
		height:260
	},
	ease: easing
}, "frame1")

.to(toolbar_main, transitionduration, {
	delay: delay,
	attr: {
		x:110,
		y:50,
		width:380,
		height:40
	},
	ease: easing
}, "frame1")

.to(toolbar_canvas, transitionduration, {
	delay: delay,
	attr: {
		x:204,
		y:60,
		width:260,
		height:30
	},
	ease: easing
}, "frame1")

.to(button_add, transitionduration, {
	delay: delay,
	attr: {
		cx:464,
		cy:325,
		r:20
	},
	ease: easing
}, "frame1")


// Frame 2
.to(device, transitionduration, {
	delay: delay,
	attr: {
		x:170,
		y:20,
		width:260,
		height:360,
		rx:20,
	},
	ease: easing
}, "frame2")

.to(background_editor, transitionduration, {
	delay: delay,
	attr: {
		x:200,
		y:50,
		width:200,
		height:300
	},
	ease: easing
}, "frame2")

.to(background_canvas, transitionduration, {
	delay: delay,
	attr: {
		x:200,
		y:95,
		width:200,
		height:255
	},
	ease: easing
}, "frame2")

.to(toolbar_main, transitionduration, {
	delay: delay,
	attr: {
		x:200,
		y:50,
		width:200,
		height:30
	},
	ease: easing
}, "frame2")

.to(toolbar_canvas, transitionduration, {
	delay: delay,
	attr: {
		x:200,
		y:75,
		width:200,
		height:20
	},
	ease: easing
}, "frame2")

.to(button_add, transitionduration, {
	delay: delay,
	attr: {
		cx:374,
		cy:325,
		r:20
	},
	ease: easing
}, "frame2")


// Frame 3
.to(device, transitionduration, {
	delay: delay,
	attr: {
		x:225,
		y:60,
		width:150,
		height:280,
		rx:20,
	},
	ease: easing
}, "frame3")

.to(background_editor, transitionduration, {
	delay: delay,
	attr: {
		x:235,
		y:90,
		width:130,
		height:220
	},
	ease: easing
}, "frame3")

.to(background_canvas, transitionduration, {
	delay: delay,
	attr: {
		x:235,
		y:125,
		width:130,
		height:185
	},
	ease: easing
}, "frame3")

.to(toolbar_main, transitionduration, {
	delay: delay,
	attr: {
		x:235,
		y:90,
		width:130,
		height:25
	},
	ease: easing
}, "frame3")

.to(toolbar_canvas, transitionduration, {
	delay: delay,
	attr: {
		x:235,
		y:110,
		width:130,
		height:15
	},
	ease: easing
}, "frame3")

.to(button_add, transitionduration, {
	delay: delay,
	attr: {
		cx:344,
		cy:290,
		r:15
	},
	ease: easing
}, "frame3")


// Frame 4 (restart)
.to(device, transitionduration, {
	delay: delay,
	attr: {
		x:0,
		y:0,
		width:600,
		height:400,
		rx:20,
	},
	ease: easing
}, "frame4")

.to(background_editor, transitionduration, {
	delay: delay,
	attr: {
		x:30,
		y:30,
		width:540,
		height:340
	},
	ease: easing
}, "frame4")

.to(background_canvas, transitionduration, {
	delay: delay,
	attr: {
		x:145,
		y:70,
		width:400,
		height:300
	},
	ease: easing
}, "frame4")

.to(toolbar_main, transitionduration, {
	delay: delay,
	attr: {
		x:30,
		y:30,
		width:540,
		height:40
	},
	ease: easing
}, "frame4")

.to(toolbar_canvas, transitionduration, {
	delay: delay,
	attr: {
		x:145,
		y:40,
		width:400,
		height:30
	},
	ease: easing
}, "frame4")

.to(button_add, transitionduration, {
	delay: delay,
	attr: {
		cx:545,
		cy:345,
		r:20
	},
	ease: easing
}, "frame4");

              
            
!
999px

Console