cssAudio - ActiveCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmloctocatspinnerstartv

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 glossy1">
 <span>Download</span>
</div>

<div class="btn glossy2">
 <span>Download</span>
</div>

<div class="btn glossy3">
 <span>Download</span>
</div>
            
          
!
            
              @import compass


@mixin glossy($base-color: #676767)
    $lightnessFactor: lightness($base-color)
    $gradientOpacity: 0.05 + 0.3 * ($lightnessFactor / 100) 
    $innerglow: inset 0 0 17px rgba(255,255,190,.41)
    $dropshadow: 0 2px 1px rgba(0,0,0,.2)  
    border: solid 1px adjust-color($base-color, $lightness: 10%)
    +box-shadow($dropshadow, $innerglow )
    background-color: $base-color
    
    @if $lightnessFactor < 50
        // Gradient with fixed opacity
        +background-image(linear-gradient(top, rgba(white,0.15) 0, rgba(white,0.10) 50%, rgba(white,0) 51% ) )
      
    @else
        // Gradient with dynamic opacity
        +background-image(linear-gradient(top, rgba(white,$gradientOpacity) 0, rgba(white,$gradientOpacity - 0.05) 50%, rgba(white,0) 51% ) )

.btn 
    float: left 
    width: 150px
    margin: 15px
    padding: 1rem 0.5rem
    font-size: 1rem
    text-align: center
    text-transform: uppercase
    line-height: 1em
    color: white
  
.glossy1
    +glossy(black)
  
.glossy2
    +glossy(#676767)

.glossy3
    +glossy(#ff0066)
  
    




            
          
!
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