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

              
                .rollCake
	.crust
	.cake
	.cream
              
            
!

CSS

              
                *
	font-size: calc(1vmin * 5)

.rollCake
	position: absolute
	top: 50%
	left: calc(50% - 0.6rem)
	transform: translate(-50%, -50%) scale(0.8)
	
	//蛋糕表皮
	.crust
		position: absolute
		top: -7.4rem
		left: -2.5rem
		width: 10.2rem
		height: 9rem
		border-radius: 50% 50% 0 0
		background: linear-gradient(280deg, rgba(141,75,16,1) 5%, rgba(213,123,0,1) 55%, rgba(208,120,1,1) 78%, rgba(143,77,15,1) 100%)
		transform: perspective(40em) rotateX(40deg) rotate(38deg)
		// overflow: hidden
	
	//蛋糕層
	.cake
		position: absolute
		top: 50%
		left: 50%
		transform: translate(-50%, -50%) rotate(20deg)
		width: 9.8rem
		height: 8rem
		border-radius: 50%
		background: radial-gradient(circle, rgba(255,216,154,1) 69%, rgba(238,150,8,1) 86%)
		box-shadow: 0 0 0 0.1rem #c77300, inset 0 0 0.6rem 0 #d57b00
		&::before
			content: ''
			position: absolute
			bottom: 0.05rem
			left: 4.2rem
			width: 1.4rem
			height: 1rem
			border-radius: 50% 0 0 50%
			background: linear-gradient(14deg, rgba(213,133,4,1) 0%, rgba(254,212,146,1) 49%)
			box-shadow: -0.1rem 0.1rem 0 0.04rem #d58504
	
	//鮮奶油+芒果
	.cream
		position: absolute
		top: -1.8rem
		left: -3.4rem
		transform: rotate(25deg)
		width: 6.6rem
		height: 5rem
		border: 0.2rem solid #fff8ec
		border-radius: 50%
		background: #fff8ec
		box-sizing: border-box
		overflow: hidden
		&::before
			content: ''
			position: absolute
			top: 1rem
			left: 0.2rem
			width: 2rem
			height: 2.8rem
			background: #f3c15a
			transform: rotate3d(1, 1, 1, 45deg)
			box-shadow: 4.6rem -3rem 0 0 #f3c15a
		&::after
			content: ''
			position: absolute
			top: 0.4rem
			left: 2.4rem
			width: 2.4rem
			height: 3rem
			background: #f3c15a
			transform: rotate3d(0.4, -0.2, 0.1, -50deg)
              
            
!

JS

              
                
              
            
!
999px

Console