cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmlicon-personicon-teamoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation

     

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.

            
              .box
	.cloud
		- for (var x = 0; x < 7; x++)
			.circle
	.horn
	.tail
	.leg.leg_back_1
	.leg.leg_back_2
	.leg.leg_front_1
	.leg.leg_front_2
            
          
!
            
              $bg: #f5f7fa;
$border_cloud: #46B3D0;
$bg_none: transparent;
$tail_bold: 3px;
$bg_tail: $bg;

body {
	height: 100vh;
	background: $bg;
	overflow: hidden;
}

.box {
	position: relative;
	width: 300px;
	height: 200px;
	margin: 50px auto;
	transform: translateX(-50vw);
	animation: move_0 9s linear infinite;
	
	@keyframes move_0 {
		100% { transform: translateX(90vw); }
	}
}

.cloud {
	position: relative;
	top: 50px;
	width: 150px;
	height: 80px;
	margin: auto;
	
	.circle {
		position: absolute;
		width: 60px;
		height: 60px;
		border-radius: 50%;
		
		&:nth-child(1) {
			left: -10px;
			border-left: 5px solid $border_cloud;
			transform: rotate(25deg);
		}
		
		&:nth-child(2) {
			top: -20px;
			left: 13px;
			border-top: 5px solid $border_cloud;
		}
		
		&:nth-child(3) {
			top: -24px;
			left: 66px;
			border-top: 5px solid $border_cloud;
		}
		
		&:nth-child(4) {
			top: -4px;
			left: 99px;
			border-right: 5px solid $border_cloud;
			transform: rotate(-25deg);
		}
		
		&:nth-child(5) {
			top: 17px;
			left: 88px;
			border-bottom: 5px solid $border_cloud;
			transform: rotate(-28deg);
		}
		
		&:nth-child(6) {
			top: 25px;
			left: 40px;
			border-bottom: 5px solid $border_cloud;
		}
		
		&:nth-child(7) {
			top: 20px;
			border-bottom: 5px solid $border_cloud;
			transform: rotate(28deg);
			z-index: 2;
		}
	}
}

.horn {
	position: relative;
	top: -58px;
	right: -86px;
	width: 50px;
	height: 50px;
	background:
		linear-gradient(152deg, $bg 35%, $bg_none 35%),
		linear-gradient(118deg, $bg_none 65%, $bg 65%),
		$border_cloud;
	border-radius: 0 0 0 70px;
	margin: auto;
}

.tail {
	position: absolute;
	top: 71px;
	left: 26px;
	width: 12px;
	height: 10px;
	border-radius: 0 50%;
	background: $bg_tail;
	border-top: 5px solid $border_cloud;
	transform: rotate(-40deg);
	box-shadow:
		0 0 0 $tail_bold $bg_tail,
		0 0 0 $tail_bold * 2 $border_cloud,
		0 0 0 $tail_bold * 3 $bg_tail,
		0 0 0 $tail_bold * 4 $border_cloud,
		0 0 0 $tail_bold * 5 $bg_tail,
		0 0 0 $tail_bold * 6 $border_cloud;
}

.leg {
	position: absolute;
	top: 120px;
	width: 14px;
	height: 40px;
	background: linear-gradient($bg 80%, $border_cloud 80%);
	border-radius: 10px 10px 0 0;
	transform: rotate(40deg);
	transform-origin: 50% 0;
	
	&_back_1 {
		left: 85px;
	}
	
	&_back_2 {
		left: 100px;
		z-index: 2;
	}
	
	&_front_1 {
		right: 105px;
		
	}
	
	&_front_2 {
		right: 90px;
		
	}
	
	&_back_1,
	&_front_1 {
		animation: move_1 1s linear infinite alternate;
		z-index: -1;
	}
	
	&_back_2,
	&_front_2 {
		transform: rotate(-45deg);
		animation: move_2 1s linear infinite alternate;
	}
}

@keyframes move_1 {
 100% { transform: rotate(-45deg); }
}

@keyframes move_2 {
 100% { transform: rotate(10deg); }
}
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console