css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              .container
  - for(var x = 0; x < 6; x++)
    .wrapper
      .card
        i(class='fal fa-arrow-right')
  
            
          
!
            
              gradient(a, b)
  background a
  background linear-gradient(to top, a, b)

flex(a, b)
  display flex
  align-items a
  justify-content b
  
grid(a, b)
  display grid
  grid-template-columns a
  grid-gap b
  
radius(a)
  border-radius a
  
background-default()
  background-size cover
  background-repeat no-repeat
  background-position center
  
font()
  font-family 'Montserrat', sans-serif
  
color1 = #ECE9E6
color2 = #58A4B0
color3 = #373F51
color4 = #1C2541

after(a)
  content ''
  height 100%
  width 100%
  position absolute
  top 0
  left 0
  background-image url(a)
  background-size cover
  background-color color3
  background-blend-mode screen
  transform skew(10deg) scale(1.2)
  transition 0.25s

*
  backface-visibility hidden

html
  gradient(color1, white)
  min-height 100vh
  flex(center, center)
  body
    margin 0
    height 100%
    width 100%
    font()
    text-align center
    h1
      text-align center
      padding 2rem 0 1rem
      margin 0
      color color3
    h6
      font-size 1.2rem
      margin 0
      font-weight 300
    p
      margin-bottom 2rem
    
.container
  grid(auto auto auto, 3rem)
  padding 2rem 4rem 4rem
  .wrapper
    transform skew(-10deg)
    transition 0.25s
    &:before
      content ''
      left 0
      top 0
      height calc(100% - 10px)
      width calc(100% - 10px)
      radius(40px)
      opacity 0
      border 2px solid color1
      position absolute
      z-index -1
      transition 0.5s 0.05s
    &:hover
      &:before
        opacity 1
        transform translateY(1.5rem) translateX(1.5rem)
    &:nth-child(1)
      .card
        &:after
          after('https://images.pexels.com/photos/953219/pexels-photo-953219.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260')
    &:nth-child(2)
      .card
        &:after
          after('https://images.pexels.com/photos/316891/pexels-photo-316891.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260')
    &:nth-child(3)
      .card
        &:after
          after('https://images.pexels.com/photos/3303/water-drink-fresh-lemons.jpg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260')
    &:nth-child(4)
      .card
        &:after
          after('https://images.pexels.com/photos/635537/pexels-photo-635537.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260')
    &:nth-child(5)
      .card
        &:after
          after('https://images.pexels.com/photos/6478/tree-lemon-fruit.jpg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260')
    &:nth-child(6)
      .card
        &:after
          after('https://images.pexels.com/photos/709816/pexels-photo-709816.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260')
    &:hover
      transform translateX(-1rem) translateY(-1rem) skew(-10deg)
      .card
        &:after
          background-blend-mode normal
        box-shadow 0.5rem 0.5rem 1rem rgba(0,0,0,0.1)
        .fal
          bottom 4rem
          background-color rgba(255,255,255,0.8)
  .card
    background-color white
    radius(40px)
    height 15rem
    padding 2rem
    position relative
    overflow hidden
    &:after
      background-default()
    .fal
      position absolute
      bottom -1rem
      right 3rem
      radius(100%)
      padding 1rem
      font-size 1.5rem
      color color3
      z-index 1
      transform skew(10deg) translateY(50%)
      text-align center
      transition 0.25s
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console