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

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

              
                .backgound

.center
  .card
    .flip
      .front        
        img.apple-logo(src="https://www.pngkey.com/png/full/15-155159_apple-logo-image-group-white-png-apple-logo.png")
        
        .chip
          .pin
          .pin
          .pin
          .pin
          .pin
          .pin

        .card-holder Filip Vitas
        
      .back
        img.goldman-logo(src="https://saunders.rit.edu/sites/rit.edu.saunders/files/images/corporate_partners/corp-logos-goldman-sachs.png")
        .strip-black
        
        .master
          .circle.master-red
          .circle.master-yellow
          .master-text mastercard
        
  
  .info Click and hold to flip card

              
            
!

CSS

              
                *, *:before, *:after 
  box-sizing: border-box
  
@font-face
  font-family: 'Inter UI'
  font-style:  normal
  font-weight: 300
  src: url("https://rsms.me/inter/font-files/Inter-Regular.woff2?v=3.5") format("woff2"),
       url("https://rsms.me/inter/font-files/Inter-Regular.woff?v=3.5") format("woff")

body
  width: 100vw
  height: 100vh
  background-color: white
  font-family: 'Inter UI'

.right
  position: absolute
  right: 0
  width: 60vw
  height: 100vh
  overflow: hidden

.center
  position: absolute
  top: 50%
  left: 50%
  transform: translate(-50%, -50%)

.card
  width: 370px
  height: 230px

@keyframes flip
  0%
  100%
    transform: rotateY(0deg)
  50%
    transform: rotateY(180deg)

.flip
  width: inherit
  height: inherit
  transition: 0.7s
  transform-style: preserve-3d
  animation: flip 2.5s ease
  
.front
.back  
  position: absolute
  width: inherit
  height: inherit
  border-radius: 15px
  box-shadow: 0 1px 3px 0px rgba(0,0,0,0.3)
  backface-visibility: hidden
  background-image: linear-gradient(to right, #f5f5f5, #f7f7f7)
  overflow: hidden

.front
  transform: translateZ(0)
  
.apple-logo
  position: absolute
  top: 30px
  left: 30px
  width: 39px
  height: 48px
  user-select: none

.chip
  position: absolute
  top: 110px
  right: 30px
  display: flex
  align-items: center
  justify-content: center
  width: 60px
  height: 40px
  border: 1px solid #666
  border-radius: 9px
  background-color: #ddd
  overflow: hidden

  .pin
    position: absolute
    width: 22px
    height: 10px
    border-radius: 5px
    border: 1px solid #555
    
    &:nth-child(1)
      top: 3px
      left: 4px
    &:nth-child(2)
      top: 14px
      left: 4px
    &:nth-child(3)
      top: 25px
      left: 4px
      
    &:nth-child(4)
      top: 3px
      right: 4px
    &:nth-child(5)
      top: 14px
      right: 4px
    &:nth-child(6)
      top: 25px
      right: 4px

.card-holder
  position: absolute
  top: 130px
  left: 5px
  margin: 0px 25px
  font-size: 20px
  letter-spacing: 0.5px
  color: #555
  
.master
  position: absolute
  right: 20px
  top: 20px
  display: flex
  
  .circle
    width: 25px
    height: 25px
    border-radius: 50%
    
    width: 50px
    height: 50px
    border-radius: 50%
    border: 1px solid #999
    
  .master-yellow
    margin-left: -20px
  .master-text
    position: absolute
    top: 53px
    left: 8px
    font-size: 12px
    color: #666
      
.card
  perspective: 1000
  
  &:active .flip
    transform: rotateY(180deg)

.back
  transform: rotateY(180deg) translateZ(0)

.back
  .goldman-logo
    position: absolute
    top: 20px
    left: 20px
    width: 90px

  .strip-black
    position: absolute
    bottom: 0px
    left: 0
    width: 100%
    height: 50px
    background: #555

.info
  position: absolute
  width: 270px
  margin: 50px
  text-align: center
  color: #aaa
  font-family: Helvetica

.js-tilt-glare > .js-tilt-glare-inner
  background-image: linear-gradient(0deg, rgba(255, 255, 255, 0) 70%, rgb(255, 255, 255) 100%)
  width: 220px
  height: 220px

              
            
!

JS

              
                
VanillaTilt.init(document.querySelector('.front'), {
  reverse: true,
  glare: true,
  max: 15,
  speed: 3000
})

              
            
!
999px

Console