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

              
                <div id="cloud">		
		<div class="top1 curve"></div>
		<div class="top2 curve"></div>		
		<div class="top3 curve"></div>
		<div class="top4 curve"></div>
		<div class="top5 curve"></div>
		<div class="face">
			<div class="left-eye"></div>
			<div class="right-eye"></div>
			<div class="mouth"></div>
	  </div>
    <div class="happy"></div>
</div>










              
            
!

CSS

              
                html{
	height: 100%;
  margin: 0;
  padding: 0;
}

body {
	height: 100%;
	background: linear-gradient(#ffffff, #b3c6ff);
}

#cloud {
  animation: float 5s ease-in-out infinite;
  animation-direction: alternate;
  position: absolute;
  top: 0;
  left: 50px;
}

.sad {
  animation: crying 0.5s infinite linear;
  width: 3px;
  height: 8px;
	border-radius: 50%;
  position: absolute;
  top: 200px;
  left: 420px;	
	opacity: 0.2;
	transform: scale(2);
  z-index: -1;
}

.curve {
  background-color: #ffffff;
  position: absolute;
  z-index: 0;
  box-shadow: 10px 10px 10px #c6c6c6;
}

.top1{
	width: 80px;
	height: 80px;
	border-radius: 40px;
	top: 200px;
	left: 420px;
}

.top2 {
	width: 150px;
	height: 150px;
	border-radius: 75px;
	top: 150px;
	left: 450px;
}

.top3 {
	width: 170px;
	height: 170px;
	border-radius: 135px;
	top: 130px;
	left: 500px;
}

.top4 {
	width: 70px;
	height: 70px;
	border-radius: 35px;
	top: 200px;
	left: 630px;
}

.top5 {
	width: 70px;
	height: 70px;
	border-radius: 35px;
	top: 225px;
	left: 600px;
}

.mouth {
	width: 25px;
	height: 25px;
	border-radius: 50%;
	border-bottom: 2px solid black;
	border-top: 2px solid transparent;
	border-right: 2px solid transparent;
	border-left: 2px solid transparent;
	position: absolute;
	top: 220px;
  left: 550px;
	z-index: 0;
}

.mouth-hover {
	width: 10px;
	height: 10px;
	background: #ffffff;
	border: 2px solid #000000;
	position: absolute;
	top: 240px;
	left: 560px;
}

.left-eye {
	width: 15px;
	height: 15px;
	background-color: #000000;
	border-radius: 10px;
	position: absolute;
	top: 200px;
	left: 520px;
	z-index: 0;
}

.right-eye {
		width: 15px;
		height: 15px;
		background-color: #000000;
		border-radius: 10px;
		position: absolute;
		top: 200px;
		left: 590px;
		z-index: 0;
	}

	.eyes-hover {
		height: 2px;		
		top: 205px;
    border-radius: 40%;
	}

@keyframes crying { 
  
0% {  
		box-shadow: 
		  30px 30px, 
		  40px 40px,  
		  50px 75px, 
			55px 50px, 
			70px 100px, 
			80px 95px, 
			110px 45px, 
			90px 35px; 
	}
	25% {  
	  	box-shadow: 
			30px 45px,
			40px 60px,
			50px 90px,
			55px 65px,
		  70px 120px,
			80px 120px,
			110px 70px,
			90px 60px;
	}
	26% {  
		box-shadow:
			 30px 45px,
			 40px 60px,
			 50px 90px,
			 55px 65px,
			 70px 40px,
			 80px 20px,
			 110px 70px,
			 90px 60px; 
	}
	50% {
		box-shadow:
			30px 70px,
			40px 80px,
		  50px 100px,
			55px 80px,
			70px 60px,
			80px 45px,
			110px 95px,
			90px 85px;
	}
  51% {
		box-shadow:
			30px 70px,
			40px 80px,
		  50px 45px,
			55px 80px,
			70px 60px,
			80px 45px,
			110px 95px,
			90px 85px;
	}
	75% {
		box-shadow:
			30px 95px,
			40px 100px,
			50px 60px,
		  55px 95px,
			70px 80px,
			80px 70px,
		  110px 120px,
		  90px 110px;
	}
	76% {
		box-shadow:
			30px 95px,
			40px 100px,
			50px 60px,
		  55px 35px,
			70px 80px,
			80px 70px,
		  110px 25px,
		  90px 15px;
	}
	100% {
		box-shadow:
		  30px 120px,
		  40px 120px,
			50px 75px,
			55px 50px,
			70px 100px,
			80px 95px,
			110px 45px,
			90px 35px;
	}
}

@keyframes float {
  0% {
    transform: translateX(100px);
  }
}

              
            
!

JS

              
                $('#cloud').hover(function() {  
		$('.mouth').toggleClass('mouth-hover');
		$('.left-eye').toggleClass('eyes-hover');
		$('.right-eye').toggleClass('eyes-hover');
		$('.happy').toggleClass('sad');  
  });
              
            
!
999px

Console