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.


                <canvas  width="150" height="150"></canvas>


                html, body {
	width: 100%;
	height: 100%;
	margin: 0;

body {
	display: flex;
	justify-content: center;
	align-items: center;
	background-color: hsla(180, 10%, 90%, 1)

canvas {
	border: 1px solid black;


                var num = 500
var canvas = document.querySelector('canvas')
canvas.width = num
canvas.height = num = num/2 + 'px' = num/2 + 'px' 

var ctx = canvas.getContext('2d')

function draw( radian, degrees ) {
	// Draw a semi transparent background
	ctx.fillStyle = 'rgba(255,255,255,0.05)'
	ctx.fillRect(0, 0, num, num)
	// Store the white background

	// Move the origin the center of the canvas
	ctx.translate( num/2, num/2 )
	// rotate it
	ctx.rotate( radian )
	// Move it back to its starting position
	ctx.translate( -num/2, -num/2 )
	// Draw the number
	ctx.fillStyle = 'hsla(' + degrees + ', 80%, 50%, 0.55)'
	ctx.font = num/3 + 'px sans-serif'
	ctx.textBaseline = 'middle'
	ctx.textAlign = 'center'
	ctx.fillText('1000', num/2, num/2)
	// Restore the white background

TweenMax.fromTo({}, 2.5, {
}, {
	modifiers: {
		rotation: function( rotation ) {

		var angle = ( Math.PI / 180 ) * rotation 
		draw( angle, rotation )
	// ease:Linear.easeNone,