cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

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.

Quick-add: + add another resource

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.

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.

            
              <h2>Material Buttons</h2>
<button class="button button_3d" data-button="red">BUTTON</button>
<button class="button button_3d" data-button="green">BUTTON</button>
<button class="button button_3d" data-button="blue">BUTTON</button>
<button class="button button_3d" data-button="purple">BUTTON</button>
<button class="button button_3d button_arrow">BUTTON</button>
<br/>
<button class="button button_em" data-button="red">BUTTON</button>
<button class="button button_em" data-button="green">BUTTON</button>
<button class="button button_em button_arrow" data-button="blue">BUTTON</button>
<button class="button button_em" data-button="purple">BUTTON</button>
<button class="button button_em">BUTTON</button>
<br/>
<button class="button button_border" data-button="red">BUTTON</button>
<button class="button button_border button_arrow" data-button="green">BUTTON</button>
<button class="button button_border" data-button="blue">BUTTON</button>
<button class="button button_border" data-button="purple">BUTTON</button>
<button class="button button_border">BUTTON</button>
<br/>
<button class="button button_shadow" data-button="red">BUTTON</button>
<button class="button button_shadow" data-button="green">BUTTON</button>
<button class="button button_shadow" data-button="blue">BUTTON</button>
<button class="button button_shadow button_arrow" data-button="purple">BUTTON</button>
<button class="button button_shadow">BUTTON</button>
<br/>
<button class="button button_normal button_group button_arrow" data-button="red">BUTTON</button>
<button class="button button_normal button_group" data-button="green">BUTTON</button>
<button class="button button_normal button_group button_disabled" data-button="blue">BUTTON</button>
<button class="button button_normal button_group" data-button="purple">BUTTON</button>
<button class="button button_normal button_group">BUTTON</button>
<br/><br/><br/><br/>
<h2>Code Example</h2>
</center>
<code>
  &lt;link rel="stylesheet" href="https://codepen.io/arianalynn/pen/xZMWXY.css"/&gt; <i>&lt;!-- Link the css file --&gt;</i>
  <br/><br/>
  &lt;button class="button button_3d" data-button="red">BUTTON&lt;/button&gt; <i>&lt;!-- Load the desired button style (.button_3d, .button_em, .button_border, .button_shadow) and button color (red, green, blue, purple or none). Special styles include .button_arrow, .button_disabled and .button_group --&gt;</i>
</code>
            
          
!
            
              @import "https://fonts.googleapis.com/css?family=Open+Sans";
$red:#EF5350;
$green:#2ecc71;
$blue:#009FE3;
$purple:#BF4A67;
$orange:#EA5B0C;
.button {
  margin: 8px;
  font-family: 'Open Sans', sans-serif;
  cursor: pointer;
  transition: all 0.3s
}

.button:focus {
  outline: 0
}

.button_3d {
  padding: .9em 1.3em .9em;
  border: 0;
  box-shadow: inset 0 -7px 0 rgba(0, 0, 0, 0.15);
  font-size: 1.2em;
  border-radius: 6px;
  color: #e6e6e6;
  background: #b4b4b4;
  transition: all 0.1s;
  &:hover {
    box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.15)
  }
}

.button_em {
  padding: .8em 1.3em .8em;
  border: 0;
  font-size: 1.2em;
  border-radius: 5px;
  color: #e6e6e6;
  background: #b4b4b4;
  box-shadow: inset 0 0 0 4.5px rgba(255, 255, 255, 0.65);
  &:hover {
    box-shadow: inset 0 0 0 4.5px rgba(255, 255, 255, 0.25)
  }
}

.button_border {
  padding: .85em 1.3em .65em;
  font-size: 1.2em;
  background: none;
  border-width: 2.7px;
  border-style: solid;
  border-color: #a0a0a0;
  border-radius: 4px;
  color: #787878;
}

.button_shadow {
  padding: .85em 1.3em .65em;
  font-size: 1.2em;
  background: #fafafa;
  border: 0;
  box-shadow: 0 0 20px silver;
  color: #787878;
}

.button_normal {
  padding: .85em 1.3em .65em;
  font-size: 1.2em;
  background: silver;
  border: 0;
  color: white;
  &:hover {
    background: darken(silver, 10)
  }
  &[data-button=red]:hover {
    background: darken($red, 10)
  }
  &[data-button=blue]:hover {
    background: darken($blue, 10)
  }
  &[data-button=green]:hover {
    background: darken($green, 10)
  }
  &[data-button=purple]:hover {
    background: darken($purple, 10)
  }
}

.button_3d,
.button_em,
.button_normal {
  &[data-button=red] {
    background: $red;
  }
  &[data-button=green] {
    background: $green;
  }
  &[data-button=blue] {
    background: $blue;
  }
  &[data-button=purple] {
    background: $purple;
  }
  &[data-button=orange] {
    background: $orange;
  }
}

.button_shadow,
.button_border {
  &:hover {
    color: #fff !important;
    background: #a0a0a0
  }
  &[data-button=red] {
    border-color: $red;
    color: $red
  }
  &[data-button=blue] {
    border-color: $blue;
    color: $blue
  }
  &[data-button=green] {
    border-color: $green;
    color: $green
  }
  &[data-button=purple] {
    border-color: $purple;
    color: $purple
  }
  &[data-button=orange] {
    border-color: $orange;
    color: $orange
  }
  &[data-button=red]:hover {
    background: $red
  }
  &[data-button=blue]:hover {
    background: $blue
  }
  &[data-button=green]:hover {
    background: $green
  }
  &[data-button=purple]:hover {
    background: $purple
  }
  &[data-button=orange]:hover {
    background: $orange
  }
}

.button_arrow {
  &:hover:after {
    content: " 》";
    position: absolute;
    margin-left: 4px;
    opacity: .6
  }
  &:hover {
    padding-left: 1em;
    padding-right: 1.6em
  }
}

.button_disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.button_group {
  margin: 16px -2px 0
}
            
          
!
999px
Loading ..................

Console