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

              
                .rabbit
  .ears
  .neck
  .head
  .mouth
  .back
  .shoulders
  .back-leg
  .front-leg
  .butt
  .butt-inner
  .tail
              
            
!

CSS

              
                $blue-l: #8DCFDF
$blue: #52B5D5
$blue-m: #6BC4D5
$blue-d: #257091
$bg: #CAEDEB
$sb : 55px
$radius: 100%
$position: absolute
$tail: 22px

body
	background-color: $bg

.rabbit
	top: 50%
	left: 50%
	transform: translate(-50%, -50%)
	width: 462px
	height: 274px

div
	position: $position
	width: $sb
	height: $sb

	&:before, &:after
		position: $position
		content: ' '
		width: $sb
		height: $sb

.head
	border-top-left-radius: $radius
	background-color: $blue-l
	left: $sb
	
	&:before
		border-top-right-radius: $radius
		left: $sb
		background-color: $blue

	&:after
		border-bottom-right-radius: $radius
		top: $sb
		left: $sb
		background-color: $blue-m

.mouth
	border-top-right-radius: $radius
	background-color: $blue
	top: $sb
	left: $sb

.ears
	border-bottom-right-radius: $sb
	background-color: $blue-l
	width: $sb * 3
	left: $sb * 2
	transform-origin: bottom left
	animation: move-ears ease infinite alternate 2s

.neck
	height: $sb * 2
	background-color: $blue
	left: $sb * 2
	top: $sb

.shoulders
	border-top-left-radius: $radius
	background-color: $blue-l
	left: $sb * 2
	top: $sb * 2

	&:before
		background-color: $blue
		border-top-right-radius: $radius
		left: $sb

.front-leg
	width: $sb * 2
	height: $sb * 2
	background-color: $blue-m
	top: $sb * 3
	left: $sb
	border-bottom-right-radius: $radius

	&:before
		border-bottom-right-radius: $radius
		background-color: $bg

	&:after
		top: $sb
		left: -$sb
		background-color: $blue-l
		border-top-left-radius: $radius

.back-leg
	width: $sb * 4
	height: $sb * 2
	background-color: $blue-d
	top: $sb * 3
	left: $sb

	&:before
		top: $sb
		left: $sb * 2
		border-top-left-radius: $radius
		background-color: $blue-l

	&:after
		width: $sb * 2
		top: $sb
		left: $sb * 3
		background-color: $blue-m

.back
	width: $sb * 2
	height: $sb * 2
	top: $sb
	left: $sb * 3
	background-color: $blue-m
	
	&:after
		width: $sb * 2
		height: $sb
		border-bottom-left-radius: $sb
		background-color: $bg

.butt
	width: $sb * 2
	height: $sb * 2
	top: $sb
	left: $sb * 4
	background-color: $blue-l
	border-top-left-radius: $radius

	&:before
		width: $sb * 2
		height: $sb * 2
		top: $sb * 2
		background-color: $blue
		border-bottom-left-radius: $radius

	&:after
		width: $sb * 2
		height: $sb * 4
		left: $sb * 2
		background-color: $blue-m
		border-bottom-right-radius: $sb * 2
		border-top-right-radius: $sb * 2

.butt-inner
	top: $sb * 2
	left: $sb * 5
	background-color: $bg
	border-top-left-radius: $radius

	&:before
		top: $sb
		background-color: $blue-l
		border-bottom-left-radius: $radius

	&:after
		height: $sb * 2
		left: $sb
		background-color: $blue
		border-bottom-right-radius: $sb
		border-top-right-radius: $sb

.tail
	background-color: $blue-m
	border-top-right-radius: $radius
	top: $sb - $tail
	left: ($sb * 7) + $tail
	transform-origin: bottom left
	animation: move-tail ease infinite alternate 1s

@keyframes move-tail
	0%
		transform: rotate(-5deg)
	100%
		transform: rotate(5deg)

@keyframes move-ears
	0%
		transform: rotate(-3deg)
	100%
		transform: rotate(0deg)
              
            
!

JS

              
                
              
            
!
999px

Console