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.


Save Automatically?

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 class="frame">
	<h3>Single Div Coffee cup</h3>
  <div class="center">
		<div class="cup"></div>


                // delete the following line if no text is used
// edit the line if you wanna use other fonts
@import url(,300);

// use only the available space inside the 400x400 frame
.frame {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 400px;
	height: 400px;
	margin-top: -200px;
	margin-left: -200px;
	border-radius: 2px;
	box-shadow: 4px 8px 16px 0 rgba(0, 0, 0, 0.1);
	overflow: hidden;
	background: #000;
	color: #333;
	font-family: "Open Sans", Helvetica, sans-serif;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;

.center {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
.cup {
	background: #ddd;
	width: 200px;
	height: 200px;
	top: 30%;
	border-radius: 100% / 50% 40% 80% 100%;
	&:before {
		content: "]";
		color: #fff;
		position: absolute;
		font-size: 120px;
		right: -33px;
		top: 10px;
		font-weight: bold;
	&:after {
		width: 150px;
		height: 30px;
		content: "";
		background: #4b371b;
		position: Absolute;
		border-radius: 100%;
		border:3px solid rgba(255,255,255,0.3);
		top: 20px;
		transform: skew(0deg);
		left: 0;
		right: 0;
		margin: 0 auto;
		box-shadow: 2px 2px 10px 2px #4b371b;
		animation: coffee-sip 2s ease-in-out alternate infinite;



                // jQuery v3.3.1 is supported