Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

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="btn_box">
  <a href="https://animate-club.com/" class="btn animation">Button</a>
</div>
              
            
!

CSS

              
                .btn_box{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
}

.btn{
  position: relative;
  color: #000;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  line-height: 40px;
  letter-spacing: 3px;
  width: 160px;
  height: 40px;
  border: 3px solid #f1e088;
  margin: auto;
  display: block;
  text-decoration: none; 
  border-radius: 50px;
  background-image: linear-gradient(to right, rgba(250, 250, 250, 0.6), rgba(250, 250, 250, 0.6) 5%, #f1e088 5%, #f1e088 10%, rgba(250, 250, 250, 0.6) 10%, rgba(250, 250, 250, 0.6) 15%, #f1e088 15%, #f1e088 20%, rgba(250, 250, 250, 0.6) 20%, rgba(250, 250, 250, 0.6) 25%, #f1e088 25%, #f1e088 30%, rgba(250, 250, 250, 0.6) 30%, rgba(250, 250, 250, 0.6) 35%, #f1e088 35%, #f1e088 40%, rgba(250, 250, 250, 0.6) 40%, rgba(250, 250, 250, 0.6) 45%, #f1e088 45%, #f1e088 50%, rgba(250, 250, 250, 0.6) 50%, rgba(250, 250, 250, 0.6) 55%, #f1e088 55%, #f1e088 60%, rgba(250, 250, 250, 0.6) 60%, rgba(250, 250, 250, 0.6) 65%, #f1e088 65%, #f1e088 70%, rgba(250, 250, 250, 0.6) 70%, rgba(250, 250, 250, 0.6) 75%, #f1e088 75%, #f1e088 80%, rgba(250, 250, 250, 0.6) 80%, rgba(250, 250, 250, 0.6) 85%, #f1e088 85%, #f1e088 90%, rgba(250, 250, 250, 0.6) 90%, rgba(250, 250, 250, 0.6) 95%, #f1e088 95%, #f1e088 100%);
}


.btn:hover{
   background-position: 80px;
}

/*アニメーション*/
.btn,
.animation:before{
  transition: all 1s ease;
}


              
            
!

JS

              
                
              
            
!
999px

Console