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

              
                <div class="container">
  <a class="btn">Click me baby yeah</a>
  <a class="btn cta">So Click-a-licious</a>
  <a class="btn cta bg">Ain't no click-nic</a>
</div>
              
            
!

CSS

              
                @import "compass/css3";
@import url('https://fonts.googleapis.com/css?family=Inconsolata');

html, body {
  background-color: #e7e7ea;
  font-family: "Inconsolata", monospace;
  font-size: 1.13em;
  font-weight: bold;
}

@mixin transition-all {
  -webkit-transition: all 200ms ease-in-out;
  -moz-transition: all 200ms ease-in-out;
  -o-transition: all 200ms ease-in-out;
	transition: all 200ms ease-in-out;
}

$slate-color: rgb(16,24,50);
$blue-color: #00bcdd;
$pink-color: #ff00ff;

.container {
  display: flex;
  align-content: center;
  justify-content: center;
  height: 100vh;
}

.btn {
  color: $slate-color;
  cursor: pointer;
  display: inline-block;
  letter-spacing: 0.075em;
  padding: .8em 1em;
  margin: auto 2em;
  position: relative;
  align-self: center;
  text-transform: uppercase;
  border: 3px $blue-color solid;
  border-image: linear-gradient(45deg, $blue-color 0%, $pink-color 100%);
  border-image-slice: 1 1 0 0;
  z-index: 1;
  box-shadow: -0.5em .5em transparentize($slate-color,1);
  transform-origin: left bottom;
  @include transition-all;
  
  &:before,
  &:after {
    border: 3px $blue-color solid;
    content: '';
    display: block;
    position: absolute;
    z-index: -1;
  }
  
  // SIDE
  &:before {
    border-image: linear-gradient(45deg, $blue-color 0%, adjust-hue($blue-color,10%) 100%);
    border-image-slice: 1 1 0 1;
    left: -0.59em; top: .15em;
    width: .31em;
    height: 100%;
    transform: skewY(-45deg);
  }
  
  // BOTTOM
  &:after {
    border-image: linear-gradient(45deg, $blue-color 0%, $pink-color 100%);
    border-image-slice: 1 1 1 0;
    bottom: -0.61em; right: 0.16em;
    width: 100%;
    height: .31em;
    transform: skewX(-45deg);
  }
  
  // Shadow
  &:hover {
    //border-image-slice: 1;
    background-color: white;
    background-size: 90%;
    transform: translate(0.5em,-0.5em);
    box-shadow: -1em 1em .15em transparentize($slate-color,.9);
    // box-shadow: -1em 1em 1em transparentize($blue-color,.9), -1em 1.9em 1.9em transparentize($slate-color,.9), 0em .38em .38em transparentize($slate-color,.9), 0em .76em .76em transparentize($slate-color,.9), 0em 1.52em 1.52em transparentize($slate-color,.9);
    
    
    &:before {
      @include background-image(linear-gradient(45deg, $blue-color 0%, adjust-hue($blue-color,10%) 100%));
      height: calc(100% - .13em);
      border-image-slice: 1;
    }
    
    &:after {
      @include background-image(linear-gradient(45deg, $blue-color 0%, $pink-color 100%));
      width: calc(100% - .13em);
      border-image-slice: 1;
    }
  }
}

.cta {
  background-color: $blue-color; // Old browsers
  @include background-image(linear-gradient(45deg, $blue-color 0%, $pink-color 100%));
  border-image: linear-gradient(45deg, lighten($blue-color,20%) 0%, lighten($pink-color,20%) 100%);
  border-image-slice: 1;
  color: white;
  
  &:before {
    border-image-slice: 1;
    @include background-image(linear-gradient(45deg, $blue-color 0%, adjust-hue($blue-color,10%) 100%));
    left: -0.75em;
    top: .15em;
  }
  
  &:after {
    border-image-slice: 1;
    @include background-image(linear-gradient(45deg, $blue-color 0%, $pink-color 100%));
    bottom: -0.75em;
    right: .15em;
  }
  
  &:hover {
    background: white;
    border-image: linear-gradient(45deg, $blue-color 0%, $pink-color 100%);
    border-image-slice: 1;
    color: $slate-color;
    
    &:before {
      height: 100%;
    }
    &:after {
      width: 100%;
    }
  }
}

.bg {
  background: none;
  border: 3px solid $slate-color;
  color: $slate-color;
  
  &:before,
  &:after {
    background: $slate-color;
    border: 3px solid $slate-color;
  }
  
  &:hover {
    border-image: none;
    
    &:before,
    &:after {
      background: $slate-color;
    }
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console