Pen Settings



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


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


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.


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.


                <div id="container">
	<div class="box one"></div>


                 body {
		 background-color: #CB9805;
		 display: flex;
		 justify-content: center;
		 align-items: center;
		 width: 100vw;
		 height: 100vh;
		 overflow: hidden;

	 #container {
		 display: block;
		 position: relative;
		 height: 80vmin;
		 width: 80vmin;
		 background-color: #A37A00;
		 border-radius: 10px;

	 .box {
		 display: block;
		 position: relative;
		 height: 100%;
		 width: 100%;
		 background-color: #C80000;
		 border-radius: 100%;
		 border-top: solid 10vmin white;
		 box-sizing: border-box;


                var RAD2DEG = 180 / Math.PI;

Draggable.create('.box', {
	type: 'rotation',
	trigger: '#container',
  //onPressInit fires before the starting values are recorded in the onPress, allowing you to make changes before any dragging occurs. onPressInit always fires BEFORE onPress.
	onPressInit: function() {
    //make the target jump to the proper rotation so we can start dragging from there.
    TweenLite.set(, {rotation: Math.atan2(this.pointerY - this.rotationOrigin.y,	this.pointerX - this.rotationOrigin.x) * RAD2DEG + 90});
	throwProps: true