octocatstartv

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.

Want a Run Button?

If active, the preview will update automatically when you change code.

            
              $blue: #333ddd;
$white: #fff;

body {
	margin: 0;
	padding: 0;
	width: 100%;
	height: 100%;
	background-color: $blue;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: 'Montserrat';
	font-weight: 700;
	padding-top: 50vh;
}

button {
	outline: 0;
	
	&.active {
		outline: 0;
	}
}

button.send {
	border: 2px solid $white;
	color: white;
	border-radius: 50px;
	padding: 15px 80px;
	background: transparent;
	position: relative;
	overflow: hidden;
	transform: translateY(-50%);
	
	.text {
		
		&.active {
			transform: translateY(-350%) scale(0);
			transition: .35s cubic-bezier(.34,-0.61,1,.64);
		}
	}
	
	&.active {
		padding: 0px 80px;
		transition: .4s cubic-bezier(.35,-0.77,.67,1.88);
	}
	
	.loader {
		position: absolute;
		width: calc(0% - 4px);
		height: calc(100% - 4px);
		background-color: $white;
		left: 2px;
		top: 2px;
		border-radius: 50px;
		
		&.active {
			width: calc(100% - 4px);
			transition: 1.3s ease-in-out;
			transition-delay: .5s
		}
	}
	
	.done {
		color: $blue;
		margin-top: -20px;
		transform: translateY(300%) scale(0);
		
		&.active {
			transform: translateY(0%) scale(1);
			transition: .4s cubic-bezier(.34,-0.61,1,.64);
		}
	}
	
	&.finished {
		padding: 15px 80px;
		transition: .4s cubic-bezier(.35,-0.77,.67,1.88);
	}
}
            
          
!
            
              $(".send").on('click', function(){
	$(".text").addClass("active");
	$(".send").addClass("active");
	$(".loader").addClass("active");
	$(".send").delay(1700).queue(function(){
        $(this).addClass("finished").clearQueue();
    });
	
	$(".done").delay(1600).queue(function(){
        $(this).addClass("active").clearQueue();
    });
})
            
          
!
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