Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

Behavior

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.

HTML

              
                div.room
	div.shelf
		div.shadow
		div.bookend.left
		div.books
			div.book
			div.book
			div.book
		div.bookend.right
		div.skull
			div.eyes
				div.eye
				div.eye
			div.teeth
				div.tooth
				div.tooth
				div.tooth
		div.potion
			div.liquid
			div.bubble
			div.bubble.two
			div.bubble.three
div.author Made with ♥ <a target="_blank" href="https://twitter.com/sarahfrisk">@SarahFrisk</a>
              
            
!

CSS

              
                @use postcss-cssnext; 
@import url('https://fonts.googleapis.com/css?family=Gentium+Book+Basic');

html {
	min-height: 100%;
	background: #ffc3aa;
	font-family: 'Gentium Book Basic', serif;
	color: #552835;
}

* {
	box-sizing: border-box;
}

.shelf {
	width: 30em;
	border-bottom: 1em solid #d97a53;
	position: fixed;
	top: 50%;
	left: 50%;
	margin-top: -5em;
	margin-left: -15em;
	padding: 0 3em;
	display: flex;
	align-items: flex-end;
}

.shelf::after,
.shelf::before {
	content: '';
	display: block;
	width: 1em;
	height: 2em;
	position: absolute;
	bottom: -3em;
	background: #732b23;
}

.shelf::before {
	left: 1em;
}

.shelf::after {
	right: 1em;
}

.shadow {
	position: absolute;
	bottom: -2.7em;
	height: 1.7em;
	left: 1em;
	right: 1em;
	z-index: -1;
	background: linear-gradient(to bottom, #aa4a46 0%, #ffc3aa 100%);
}

.bookend {
	width: 3em;
	height: 4em;
	position: relative;
}

.bookend::before {
	height: .75em;
	background: #a84033;
	width: 100%;
	content: '';
	display: block;
	position: absolute;
	bottom: 0;
}

.bookend::after {
	height: 100%;
	width: .75em;
	content: '';
	display: block;
	position: absolute;
	background: #a84033;
}

.bookend.left::after{
	right: 0;
}


.books {
	display: flex; 
	align-items: flex-end;
}

.book {
	overflow: hidden;
	width: 2em;
	height: 9em;
	background: #907d41;
	position: relative;
}

.book::before {
	height: .5em;
	width: 100%;
	background: rgba(255,255,255,.15);
	content: '';
	display: block;
	position: absolute;
	top: 15%;
}

.book::after {
	height: .5em;
	width: 100%;
	background: rgba(255,255,255,.15);
	content: '';
	display: block;
	position: absolute;
	bottom: 5%;
}


.book:first-child {
	height: 10em;
	width: 1.7em;
	background: #f3888e;
}

.book:last-child {
	height: 10em;
	width: 1.5em;
	background: #552835;
}

.skull {
	height: 4em;
	width: 5em;
	background: #fff;
	border-radius: 100%;
	position: relative;
	margin: 0 2em;
}

.skull::before{
	content: '';
	display: block;
	position: absolute;
	bottom: -0.3em;
	background: white;
	width: 5.5em;
	height: 2em;
	left: 50%;
	margin-left: -2.75em;
	border-radius: 100%;
}

.eye {
	position: absolute;
	background: black;
	height: 1.75em;
	width: 1em;
	border-radius: 100%;
	top: 1em;
	z-index: 100;
}

.eye:first-child {
	right: 50%;
	margin-right: .25em;
}

.eye:last-child {
	left: 50%;
	margin-left: .25em;
}

.teeth {
	display: flex;
	justify-content: center;
	position: absolute;
	bottom: -.75em;
	width: 100%;
	right: 0;
}

.tooth {
	background: #fff;
	height: 2em;
	width: 1em;
	border-bottom-left-radius: .75em;
	border-bottom-right-radius: .75em;
	border-bottom: 3px solid #742c24;
}

.potion {
	background: #fff2ed;
	height: 5em;
	width: 5em;
	border-radius: 100% 100% 70% 70%;
	position: relative;
}

.potion::after {
	content: '';
	display: block;
	background: #fff2ed;
	position: absolute;
	height: 3em;
	width: 2em;
	top: -2em;
	left: 50%;
	margin-left: -1em;
	z-index: -1;
}

.potion::before {
	content: '';
	display: block;
	background: #fff2ed;
	position: absolute;
	height: 1em;
	width: 2.5em;
	top: -2.5em;
	left: 50%;
	margin-left: -1.25em;
	border-radius: 75%;
	z-index: -1;
}

.liquid {
	background: #ff90aa;
	height: 3em;
	width: 4.2em;
	border-radius: 10px 10px 70% 70%;
	position: absolute;
	left: 50%;
	margin-left: -2.1em;
	bottom: .1em;
}

.bubble {
	z-index: 9999;
	animation: bubble 1.8s ease infinite;
  animation-delay: 0.2s;
	background: #ff90aa;
	height: 20px;
	width: 20px;
	border-radius: 100%;
	left: 1.7em;
	bottom: 2em;
	position: absolute;
	opacity: 1;
}

.bubble.two {
	z-index: 9999;
	animation: bubble 1.5s ease infinite;
  animation-delay: 0.1s;
	background: #ff90aa;
	height: 10px;
	width: 10px;
	border-radius: 100%;
	left: 1.5em;
	bottom: 2em;
	position: absolute;
	opacity: 1;
}

.bubble.three {
	z-index: 9999;
	animation: bubble 1.5s ease infinite;
  animation-delay: -0.1s;
	background: #ff90aa;
	height: 10px;
	width: 10px;
	border-radius: 100%;
	left: 1.8em;
	bottom: 2em;
	position: absolute;
	opacity: 1;
}

@keyframes bubble {
  0% {
		opacity: 1;
  }
	100% {
		opacity: 0;
    bottom: 9em;

  }
}

.author {
	position: absolute;
	right: 1em;
	bottom: .5em;
}

a {
	color: #552835;
}
              
            
!

JS

              
                
              
            
!
999px

Console