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 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

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

              
                <!--Practice From codyhouse course-->
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>Animate Button</title>
  <!--icon form Fort Awesome-->
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
  <link href='https://fonts.googleapis.com/css?family=Raleway' rel='stylesheet' type='text/css'>
    <link href='https://fonts.googleapis.com/css?family=Nunito' rel='stylesheet' type='text/css'>
  
</head>

<body>
  <section>
    <div class="center">
	      	<div class="Btn Btn-Down blue" data-content="Check it out" data-color="#E4B363">
            <a href="#0">
              <span>
                  <em>Profile</em>
                  <i aria-hidden="true" class="fa fa-user fa-lg"></i>				
              </span>
            </a>
      </div>
      <div class="Btn Btn-Up orange" data-content="Data size: 3M">
            <a href="#1">
              <span>
                  <em>Download</em>
                  <i aria-hidden="true" class="fa fa-cloud-download fa-lg"></i>				
              </span>
            </a>
      </div>
      <div class="Btn Btn-Down pink" data-content="Try it!">
            <a href="#2">
              <span>
                  <em>Setting</em>
                  <i aria-hidden="true" class="fa fa-wrench fa-lg"></i>
              </span>
            </a>
      </div>
    </div>
  </section>
</body>

</html>
              
            
!

CSS

              
                /*---------------------

    Primary style

---------------------*/
*, *::after, *::before
  box-sizing border-box

html
  font-size 62.5%

body
  font-size 1.7rem
  font-family 'Nunito', sans-serif
  color white
  background-color #39393A

a
  text-decoration none
/*-------------------

    Styling Button

--------------------*/
section
  width 100%
  height 100%
  display table
  .center
    display table-cell
    height 300px
    vertical-align middle
    text-align center
.blue
  background-color #809BCE
.orange
  background-color #E4B363
.pink
  background-color #F07D5A
.Btn
  position relative
  display inline-block
  width 200px
  height 60px
  border-radius 50em
  margin 10px
  box-shadow 0 2px 10px rgba(0,0,0,.7), inset 0 3px 0 rgba(255,255,255,.2)
  &::before
    content attr(data-content)
    width 140px
    height 60px
    line-height 60px
    background-color #E8E9EB
    border-radius .25em
    left calc(50% - 70px)
  &::after
    content ''
    border 10px solid transparent
    left calc(50% - 10px)
  &:hover
    em
      top -100%
    i
      top 0%

span, em,i
  position absolute
  width 100%
  height 100%
  left 0
  color white

span
  overflow hidden

em, i
  transition top, .3s

em
  font-style normal
  top 0
  line-height 60px

i
  top 100%
  margin-top 22px
  
.Btn-Up
  &::before
    bottom 90px
  &::after
    border-top-color #E8E9EB
    bottom 70px
.Btn-Up::before, .Btn-Up::after
  margin-bottom 10px
  transition opacity .3s, margin-bottom .3s, visibility .3s

.Btn-Up:hover::before, .Btn-Up:hover::after
  margin-bottom 0px

.Btn-Down
  &::before
    top 90px
  &::after
    border-bottom-color #E8E9EB
    top 70px

.Btn-Down::before, .Btn-Down::after
  margin-top 10px
  transition opacity .3s, margin-top .3s,visibility .3s

.Btn-Down:hover::before, .Btn-Down:hover::after
  margin-top 0px
.Btn::before, .Btn::after
  position absolute
  color black
  opacity 0
  visibility hidden
.Btn:hover::before, .Btn:hover::after
  opacity 1
  visibility visible
              
            
!

JS

              
                
              
            
!
999px

Console