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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                <div class="container">
  <div class="app">
    <div class="app-buttons" :class="buttonsAnimate">
      <div class="button button--facebook">Facebook</div>
      <div class="button button--twitter">Twitter</div>
      <div class="button button--instagram">Instagram</div>
    </div>
    <div class="app-content" @click="clickCard = !clickCard, buttonAnimate = !buttonAnimate" :class="cardAnimate">
      <div class="app-photo"></div>
      <div class="app-title">
        <div>Michelle Ivan</div>
        <div>@michelleivan</div>
      </div>
      <div class="app-bottom">
        <div class="app__block">
          <h3>Facebook</h3>
          <p>734</p>
        </div>
        <div class="app__block">
          <h3>Twitter</h3>
          <p>124</p>
        </div>
        <div class="app__block">
          <h3>Instagram</h3>
          <p>546</p>
        </div>
      </div>
    </div>
  </div>  
</div>


              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css?family=Montserrat:300,400,700')

$black: #29323c
$gray: #8A8F94

$main-color: #dba282

$main-font: 'Montserrat', sans-serif

*
  margin: 0
  padding: 0
  box-sizing: border-box
  text-decoration: none
  color: $black
  font-family: $main-font
  font-size: 16px

.align-center
  display: flex
  justify-content: center
  align-items: center

.button
  width: auto
  border-radius: 4px
  border: 1px solid $black
  text-align: center
  padding: 12px 0
  &--facebook
    border-color: #a3bded
    color: #a3bded
    margin-bottom: 8px
  &--twitter
    border-color: #005bea
    color: #005bea
    margin-bottom: 8px
  &--instagram
    border-color: #fbc8d4
    color: #fbc8d4
    
.container  
  @extend .align-center
  width: 100vw
  height: 100vh
  
.app
  position: relative
  width: 328px
  height: 452px
  cursor: pointer
  &--animate
    transform: perspective(600px) rotateY(60deg) translateX(-80px)
  &-content
    position: relative
    transition: .24s all
    transform: perspective(0) rotateY(0) translateX(0) scale(1,1)
    display: flex
    flex-direction: column
    align-items: center
    width: 328px
    height: 452px
    border-radius: 4px
    box-shadow: 0 24px 40px 0 rgba(0,0,0,0.16)
    overflow: hidden
    cursor: pointer
    filter: blur(0)
    background: #fff
    cursor: pointer
    & > *
      pointer-events: none
    &--animate
      filter: blur(2px)
      transform: perspective(600px) rotateY(60deg) translateX(-60px) scale(0.7,0.7)
  &-buttons
    position: absolute
    z-index: -1
    width: 164px
    height: 150px
    top: 50%
    left: 50%
    margin-top: -75px
    margin-left: -164px
    transition: .24s all
    &--animate
      z-index: 1
      margin-left: 60px
  &-photo
    width: 100%
    height: 284px
    background: url('https://images.unsplash.com/photo-1442458370899-ae20e367c5d8?auto=format&fit=crop&w=1267&q=80&ixid=dW5zcGxhc2guY29tOzs7Ozs%3D')
    background-position: center
    background-size: 120%
  &-title
    padding-top: 24px
    height: 84px
    text-align: center
    div:first-child
      text-transform: uppercase
      font-weight: 700
      letter-spacing: 2px
      color: $main-color
    div:last-child
      font-size: 14px
      font-weight: 300
      color: $gray
      margin-top: 8px
  &-bottom
    padding-bottom: 24px
    height: 84px
    display: flex
    align-items: flex-end
    width: 100%
    justify-content: space-around
  &__block
    text-align: center
    h3
      text-transform: uppercase
      font-weight: 300
      font-size: 12px
      color: $gray
      margin-bottom: 4px
    p
      font-weight: 700
      
              
            
!

JS

              
                new Vue ({
  el: '.app',
  data: {
    text: 'Test Text',
    clickCard: false,
    buttonAnimate: false
  },
  computed: {
    cardAnimate: function() {
      return {
        'app-content--animate': this.clickCard
      }
    },
    buttonsAnimate: function() {
      return {
        'app-buttons--animate': this.buttonAnimate
      }
    }
  }
});
              
            
!
999px

Console