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="clip">
  <div class="grad"></div>
</div>

<button><a href="#">Hover Me</a><span></span></button>
            
          
!
            
              @import "nib"

html
  padding: 30px
.clip
  width: 400px
  height: 300px
  overflow: hidden
  margin-bottom: 30px
.grad
  position: relative
  width: 400px
  height: 900px
  background: linear-gradient(top, yellow, blue)
  animation: infinite_gradient 4s linear infinite

@keyframes infinite_gradient
  0%, 100%
    transform: translateY(-300px)
  50%
    transform: translateY(0)
  
button
  border: 0
  width: 200px
  height: 40px
  overflow: hidden
  display: block
  padding: 0
  cursor: pointer
span
  height: 120px
  display: block
  background: linear-gradient(top, yellow, blue)
  transform: translateY(-80px)
  &:hover
    animation: button_gradient 400ms linear forwards
a
  position: relative
  z-index: 11
  line-height: 40px
  text-decoration: none
  color: #fff
 
@keyframes button_gradient
  100%
    transform: translateY(-40px)
            
          
!
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