cssAudio - ActiveCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmlicon-personicon-teamoctocatspinnerstartv

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.

            
              <div class="btn-container">
  <a class="elegant" href="#">
    An Elegant Button
  </a>
</div>

<div class="btn-container">
  <a class="gymnastics" href="#">
    Do a Handstand
  </a>
</div>

<div class="btn-container">
  <a class="clown" href="#">
    Learn About Clowns!
  </a>
</div>

<div class="btn-container">
  <a class="space" href="#">
    Go to Space Camp
  </a>
</div>
            
          
!
            
              @import "bourbon";

.btn-container {
  text-align: center;
  margin: 3em auto;
}

.elegant {
  display: inline-block;
  margin: 4em auto;
  padding: 10px 20px;
  border: 1px solid #CC9900;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  margin: 30px auto;
  color: #333333;
  font: 14px "helvetica", sans-serif;
  background: #fafafa;
  &:before {
		content: '';
		display: block;
		position: absolute;
		top: -18px;
		left: 52%;
		width: 30px;
		height: 10px;
		border-top: 1px solid #CC9900;
		@include transform(rotate(-65deg));
		@include transition (all 0.7s ease);
	}
	&:after {
		content: '';
		display: block;
		position: absolute;
		bottom: -22px;
		left: 38%;
		width: 30px;
		height: 10px;
		border-top: 1px solid #CC9900;
		@include transform(rotate(-65deg));
		@include transition (all 0.7s ease);
	}
	&:hover,
  &:focus,
	&:active {
	  &:before {
			@include transform(rotate(-130deg));
			top: -21px;
			left: 35%;
		}
		&:after {
			@include transform(rotate(-130deg));
			left: 60%;
			bottom: -15px;
		}
	}
}

.gymnastics {
  display: inline-block;
  margin: 4em auto;
  padding: 10px 20px;
  border: 3px solid #CC297A;
  text-decoration: none;
  position: relative;
  margin: 30px auto;
  color: #333333;
  font: 18px "georgia", serif;
  font-style: italic;
  &:before {
		content: '';
		display: block;
		position: absolute;
		top: -18px;
		left: 52%;
		width: 30px;
		height: 10px;
		border-top: 3px solid #CC297A;
		@include transform(rotate(-65deg));
		@include transition (all 0.5s ease-out);
	}
	&:after {
		content: '';
		display: block;
		position: absolute;
		bottom: -23px;
		left: 38%;
		width: 30px;
		height: 10px;
		border-top: 3px solid #CC297A;
		@include transform(rotate(-65deg));
		@include transition (all 0.5s ease-out);
	}
	&:hover,
  &:focus,
	&:active {
	  &:before {
			@include transform(rotate(90deg));
			top: -24px;
			left: 40%;
		}
		&:after {
			@include transform(rotate(90deg));
			left: 40%;
			bottom: -22px;
		}
	}
}

.clown {
  display: inline-block;
  margin: 4em auto;
  padding: 10px 20px;
  border-top: 3px dashed red;
  border-bottom: 3px dashed blue;
  border-right: 3px dashed yellow;
  border-left: 3px dashed green;
  text-decoration: none;
  position: relative;
  margin: 30px auto;
  color: #333333;
  font: 18px "Comic Sans MS", cursive, sans-serif;
  @include transition (all 0.5s bounce);
  &:before {
		content: '';
		display: block;
		position: absolute;
		top: -18px;
		left: 52%;
		width: 30px;
		height: 10px;
		border-top: 3px dashed red;
		@include transform(rotate(-65deg));
		@include transition (all 0.5s ease-out);
	}
	&:after {
		content: '';
		display: block;
		position: absolute;
		bottom: -23px;
		left: 38%;
		width: 30px;
		height: 10px;
		border-top: 3px dashed blue;
		@include transform(rotate(-65deg));
		@include transition (all 0.5s ease-out);
	}
	&:hover,
  &:focus,
	&:active {
    border-top: 3px dotted blue;
    border-bottom: 3px dotted green;
    border-right: 3px dotted red;
    border-left: 3px dotted yellow;
	  &:before {
			@include transform(rotate(1080deg));
			top: 0px;
			left: 0;
        border-top: 3px dotted blue;
        width: 100%
		}
		&:after {
			@include transform(rotate(1080deg));
			left: 0;
			bottom: -11px;
        border-top: 3px dotted green;
        width: 100%
		}
	}
}

.space {
  display: inline-block;
  margin: 4em auto;
  padding: 10px 20px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  margin: 30px auto;
  color: #ffffff;
  font: 14px "helvetica", sans-serif;
  background: #002952;
  @include transition (all 2s ease);
  &:before {
		content: '';
		display: block;
		position: absolute;
		top: -23px;
		left: 40%;
		width: 30px;
		height: 10px;
		border-top: 5px solid red;
		@include transform(rotate(90deg));
		@include transition (all 2.7s ease);
	}
	&:after {
		content: '';
		display: block;
		position: absolute;
		bottom: -22px;
		left: 40%;
		width: 30px;
		height: 10px;
		border-top: 5px solid red;
     @include transform(rotate(90deg));
		@include transition (all 1.7s ease-in);
	}
	&:hover,
  &:focus,
	&:active {
    margin: 10px auto;
    @include transform(rotate(5deg));
    @include transform(skew(10deg));
	  &:before {
			@include transform(rotate(-130deg));
			top: -999px;
			left: 35%;
		}
		&:after {
			@include transform(rotate(930deg));
			left: 60%;
			bottom: 999px;
		}
	}
}
            
          
!
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