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

              
                <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800" >
	<radialGradient id="gradient" r="300" gradientUnits="userSpaceOnUse">
            <stop offset="0" stop-color="#ccc" stop-opacity="1"/>
            <stop offset="1" stop-color="#ccc" stop-opacity=".1"/>
        </radialGradient>
  <path class="path" fill="none" stroke="url(#gradient)" stroke-width="16" stroke-linecap="round" stroke-dasharray=".1 50" d="M-190.7 442.7c72.2-196.3 411.9-306.4 644-212 218.2 88.7 180 292.6 448 480 168.7 117.9 459.9 230.1 588 116 134.1-119.5 79.4-478.4-128-632-161-119.2-388.6-96-544-28-388.3 169.8-351.7 630.3-680 708-167.7 39.7-355.1-38.3-440-160-147.3-211.1-4.2-579.7 236-748 241.9-169.5 524.3-95.1 564-84 408.2 114.4 719.7 618.1 580 872-155.3 282.3-872.8 264-1000 20-136-260.9 308.1-961.5 836-936 275.2 13.3 589.8 224.6 580 424-19.6 398-1336.1 814.6-1632 472-69-79.9-84.6-203.4-52-292z"/>
	<g class="bee">
		<rect x="-10" y="-20" width="100" height="140" fill="none"/>
		<g fill="#fff" stroke="#000" stroke-width="2" >
			<circle cx="64" cy="42" r="7"/>
			<circle cx="64" cy="60" r="7"/>
			<path class="leftWing" d="M22.8 24.5L48 34 38.5 8.8C35.3.6 24.8-1.6 18.6 4.6c-6.3 6.2-4 16.8 4.2 19.9z"/>
			<path class="rightWing" d="M22.8 77.6L48 68l-9.5 25.2c-3.1 8.2-13.7 10.5-19.9 4.3-6.3-6.3-4-16.8 4.2-19.9z"/>
		</g>
		<rect y="34" width="56" height="32" rx="16" fill="#fff"/>
		<path d="M8 37v28c-4.8-2.8-8-8-8-14s3.2-11.2 8-14zm40 0v28c4.8-2.8 8-8 8-14s-3.2-11.2-8-14zM16 67h8V35h-8v32zm16 0h8V35h-8v32z"/>
	</g>
</svg>
              
            
!

CSS

              
                body{
	margin:0;
}
svg{
	width:100%;
	height:100%;
	position:fixed;
}
              
            
!

JS

              
                var path = MorphSVGPlugin.pathDataToBezier(".path");
TweenLite.set(".bee", {xPercent:-50, yPercent:-50, transformOrigin:"center"});

var bee = document.querySelector(".bee");
TweenMax.to(bee, 20, {
	force3D:true,
	bezier: {
		type: "cubic",
		values: path,
		autoRotate:true
	},
	ease:Linear.easeNone,
	repeat:-1,
	onUpdate:moveGradient
});

function moveGradient(){
	var transform=bee._gsTransform;
	TweenMax.set("#gradient",{attr:{cx:transform.x,cy:transform.y}})
}

TweenMax.to(".leftWing",.01,{rotation:30,transformOrigin:"100% 100%",ease:Quint.easeInOut,yoyo:true,repeat:-1});
TweenMax.to(".rightWing",.01,{rotation:-30,transformOrigin:"100% 0%",ease:Quint.easeInOut,yoyo:true,repeat:-1});
              
            
!
999px

Console