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

              
                <div class="min-h-screen bg-gray-900 pb-20 grid">
  <h1 class='flex items-end justify-center h-full w-full text-3xl text-white font-thin uppercase'>Hover me</h1>
  
  <div class='grid place-items-center lg:grid-cols-3 _container gap-y-10'>
  <div class="card rounded-lg px-8 py-20 relative hover:shadow-xl">
    <h2 class="name text-gray-100 text-center text-xl font-medium uppercase transition-all duration-500 opacity-0 z-10 absolute top-0 left-0 w-full">Cyberpunk 2077</h2>
    <a href="https://www.cyberpunk.net/us/en/pre-order" class="buy buy-cyberpunk absolute bottom-0 bg-gray-600 text-white hover:text-black font-medium px-4 py-2 rounded-full transition-all duration-500 opacity-0 z-10 bg-cyberpunk">Buy Now</a>
    <div class="image image-1">
      <img src="https://images.igdb.com/igdb/image/upload/t_cover_big/co1rft.jpg" alt="Cyberpunk 2077" class="product rounded transition-all duration-500">  
    </div>  
  </div>
  
  <div class="card rounded-lg px-8 py-20 relative hover:shadow-xl">
    <h2 class="name text-gray-100 text-center text-xl font-medium uppercase transition-all duration-500 opacity-0 z-10 absolute top-0 left-0 w-full">Among Us</h2>
    <a href="https://store.steampowered.com/app/945360/Among_Us/" class="buy buy-among-us absolute bottom-0 bg-gray-600 hover:bg-gray-500 text-white px-4 py-2 rounded-full transition-all duration-500 opacity-0 z-10 bg-among-us">Buy Now</a>
    <div class="image image-2">
      <img src="https://images.igdb.com/igdb/image/upload/t_cover_big/co1uaf.jpg" alt="Among Us" class="product rounded transition-all duration-500">
    </div>
  </div>
  
  <div class="card rounded-lg px-8 py-20 relative hover:shadow-xl">
    <h2 class="name text-gray-100 text-center text-xl font-medium uppercase transition-all duration-500 opacity-0 z-10 absolute top-0 left-0 w-full">Fall Guys</h2>
    <a href="https://store.steampowered.com/app/1097150/Fall_Guys_Ultimate_Knockout/" class="buy buy-fall-guys absolute bottom-0 bg-gray-600 hover:bg-gray-500 text-white px-4 py-2 rounded-full transition-all duration-500 opacity-0 z-10 bg-fall-guys">Buy Now</a>
    <div class="image image-3">
      <img src="https://images.igdb.com/igdb/image/upload/t_cover_big/co2fq7.jpg" alt="Fall Guys" class="product rounded transition-all duration-500">
    </div>
  </div>
</div>  
  </div>
  
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css2?family=Poppins:ital,[email protected],100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

:root {
  --cyberpunk-yellow: #f0e801;
  --among-us-red: #c51110;
  --fall-guys-pink: #fa40a3;
}

.bg-cyberpunk:hover {
  background: var(--cyberpunk-yellow);
}
.bg-among-us:hover {
  background: var(--among-us-red);
}
.bg-fall-guys:hover {
  background: var(--fall-guys-pink);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
}

.card {
  transform-style: preserve-3d;
  -moz-transform-style: preserve-3d;
}

.name {
  transform: translate3d(0, 0, 50px);
  transform-style: preserve-3d;
  -moz-transform-style: preserve-3d;
}

.card:hover .name {
  top: 1rem;
  opacity: 1;
}

.buy {
  left: 50%;
  transform: translate3d(-50%, 0, 50px);
  transform-style: preserve-3d;
  -moz-transform-style: preserve-3d;
}

.card:hover .buy {
  bottom: 1rem;
  opacity: 1;
}

img {
  transform-style: preserve-3d;
  -moz-transform-style: preserve-3d;
}

.card:hover img {
  transform: translate3d(0, 0, 50px);
  transform-style: preserve-3d;
}

.image::before {
  content: "";
  border-radius: .25rem;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: .25rem;
  opacity: 0;
  transition: all .5s;
}

.card:hover .image::before {
  opacity: .2;
}

.image-1::before {
  background: center / cover url("https://images.igdb.com/igdb/image/upload/t_cover_big/co1rft.jpg");
}
.image-2::before {
  background: center / cover url("https://images.igdb.com/igdb/image/upload/t_cover_big/co1uaf.jpg");
}
.image-3::before {
  background: center / cover url("https://images.igdb.com/igdb/image/upload/t_cover_big/co2fq7.jpg");
}
              
            
!

JS

              
                VanillaTilt.init(document.querySelectorAll(".card"), {
  max: 25,
  speed: 1000,
  transition: true,
})
              
            
!
999px

Console