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

              
                <head>
	<title>SVG Animation</title>
</head>
<body>

<svg xmlns:sketch="http://www.bohemiancoding.com/sketch/ns" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" viewBox="0 0 749 594" enable-background="new 0 0 749 594" xml:space="preserve">

<path class="outline" fill="#4E2777" d="M504 487H237c-8.8 0-16-7.2-16-16V124c0-8.8 7.2-16 16-16h267c8.8 0 16 7.2 16 16v347 C520 479.8 512.8 487 504 487z M237 116c-4.4 0-8 3.6-8 8v347c0 4.4 3.6 8 8 8h267c4.4 0 8-3.6 8-8V124c0-4.4-3.6-8-8-8H237z"/>

<path class="a" fill="#3C1763" d="M334.9 232h-10.4c-1.2 0-2.1-0.3-2.9-0.9c-0.8-0.6-1.3-1.3-1.6-2.2l-5.4-14.8h-29.9l-5.4 14.8 c-0.3 0.8-0.8 1.5-1.6 2.1c-0.8 0.6-1.7 1-2.9 1h-10.5l28.4-72.3h13.8L334.9 232z M288 204.7h23.1l-8.8-24 c-0.4-1.1-0.8-2.3-1.3-3.8c-0.5-1.5-1-3-1.4-4.7c-0.5 1.7-0.9 3.3-1.4 4.8c-0.4 1.5-0.9 2.8-1.3 3.8L288 204.7z"/>

<g>
	<path class="line" id="line1" sketch:type="MSShapeGroup" fill="none" stroke="#4E2777" stroke-width="16" stroke-linecap="square" d="M270.5 267 H390"/>
	<path class="line" id="line2" sketch:type="MSShapeGroup" fill="none" stroke="#4E2777" stroke-width="16" stroke-linecap="square" d=" M270.5 288H469"/>
	<path class="line" id="line3" sketch:type="MSShapeGroup" fill="none" stroke="#4E2777" stroke-width="16" stroke-linecap="square" d=" M270.5 309H469"/>
	<path class="line" id="line4" sketch:type="MSShapeGroup" fill="none" stroke="#4E2777" stroke-width="16" stroke-linecap="square" d=" M270.5 330H469"/>
	<path class="line" id="line5" sketch:type="MSShapeGroup" fill="none" stroke="#4E2777" stroke-width="16" stroke-linecap="square" d=" M270.5 351H469"/>
	<path class="line" id="line6" sketch:type="MSShapeGroup" fill="none" stroke="#4E2777" stroke-width="16" stroke-linecap="square" d=" M270.5 372H469"/>
	<path class="line" id="line7" sketch:type="MSShapeGroup" fill="none" stroke="#4E2777" stroke-width="16" stroke-linecap="square" d=" M270.5 393H469"/>
	<path class="line" id="line8" sketch:type="MSShapeGroup" fill="none" stroke="#4E2777" stroke-width="16" stroke-linecap="square" d=" M270.5 414H469"/>
	<path class="line" id="line9" sketch:type="MSShapeGroup" fill="none" stroke="#4E2777" stroke-width="16" stroke-linecap="square" d=" M270.5 435H421"/>
</g>
<rect class="photo" id="Rectangle-15" x="361" y="158" sketch:type="MSShapeGroup" fill="#4E2777" stroke="#4E2777" stroke-width="2" stroke-linecap="square" d=" M270.5 414H469" width="116" height="74" >
</rect>
</svg>



</body>
</html>
              
            
!

CSS

              
                /*Letter animation*/
.a {
	animation: pop_b 1s cubic-bezier(0.68, -0.55, 0.265, 1.55);
	-webkit-animation: pop_b 1s cubic-bezier(0.68, -0.55, 0.265, 1.55);
	-webkit-animation-fill-mode: forwards;
}


/*Photo stuff*/

.photo {
	animation: pop 1s cubic-bezier(0.68, -0.55, 0.265, 1.55);
	-webkit-animation: pop 1s cubic-bezier(0.68, -0.55, 0.265, 1.55);
	-webkit-animation-fill-mode: forwards;
}

/*Line animations*/

.line {
	stroke-dasharray: 300;
	stroke-dashoffset: 300;
	animation: dash 2s cubic-bezier(0.23, 1, 0.32, 1);;
	-webkit-animation: dash 2s cubic-bezier(0.23, 1, 0.32, 1);;
	-webkit-animation-fill-mode: forwards;
}

#line1 {
	animation-delay:1s;
	-webkit-animation-delay:1s;
}
#line2 {
	animation-delay:1.2s;
	-webkit-animation-delay:1.2s;
}
#line3 {
	animation-delay:1.6s;
	-webkit-animation-delay:1.6s;
}
#line4 {
	animation-delay:1.9s;
	-webkit-animation-delay:1.9s;
}
#line5 {
	animation-delay:2.3s;
	-webkit-animation-delay:2.3s;
}
#line6 {
	animation-delay:2.7s;
	-webkit-animation-delay:2.7s;
}
#line7 {
	animation-delay:3.1s;
	-webkit-animation-delay:3.1s;
}
#line8 {
	animation-delay:3.5s;
	-webkit-animation-delay:3.5s;
}
#line9 {
	animation-delay:3.9s;
	-webkit-animation-delay:3.9s;
}




/*Keyframes*/
@-webkit-keyframes pop_b {
	0% {-webkit-transform:scale(.2); -webkit-transform:rotate(27deg); opacity: 0;}
	100% {-webkit-transform:scale(1); -webkit-transform:rotate(0deg); opacity: 100%;}
}

@-webkit-keyframes pop {
	0% {-webkit-transform:scale(.7); -webkit-transform:rotate(7deg); opacity: 0;}
	100% {-webkit-transform:scale(1); -webkit-transform:rotate(0deg); opacity: 100%;}
}

@keyframes dash {
  0% {stroke-dashoffset: 300;}
  100% {stroke-dashoffset: 0;}
}

@-webkit-keyframes dash {
  0% {stroke-dashoffset: 300;}
  100% {stroke-dashoffset: 0;}
}

@keyframes write {
    0% { opacity: 0; }
	100% { opacity: 100%; }
}

@-webkit-keyframes write {
    0% { opacity: 0; }
	100% { opacity: 100%; }
}
              
            
!

JS

              
                


              
            
!
999px

Console