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

Auto Save

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

              
                <section class="section section--hero">
      <div class="container">
        <div class="hero-content">
          <h1 class="title">3D Waving Cards</h1>
          <p class="description">This is a codepen for hover effect making the cards look like a wave with no JavaScript.</p>
        </div>
      </div>
    </section>
    <section class="section section--body">
      <div class="container-fluid">
        <div id="slider-container" class="slider">
          <div class="slider-item">
            <div class="slider-item__wrapper">
              <span class="slider-item__label">Minion</span>
              <div class="slider-item__image">
                <img src="https://thanosmatsoukas.gr/wp-content/themes/thanosmatsoukas/public/images/codepen/3d-waving-cards/slider/slider-1.jpg" alt="">
              </div>
              <div class="slider-item__content">
                <h3 class="title">Aurelius Mindweaver</h3>
                <p class="description">In the hail of midnight discoveries you can find the Slide Item.</p>
              </div>
            </div>
          </div>
          <div class="slider-item">
            <div class="slider-item__wrapper">
              <span class="slider-item__label">Minion</span>
              <div class="slider-item__image">
                <img src="https://thanosmatsoukas.gr/wp-content/themes/thanosmatsoukas/public/images/codepen/3d-waving-cards/slider/slider-2.jpg" alt="">
              </div>
              <div class="slider-item__content">
                <h3 class="title">Seraphina Dreamshaper</h3>
                <p class="description">In the hail of midnight discoveries you can find the Slide Item.</p>
              </div>
            </div>
          </div>
          <div class="slider-item">
            <div class="slider-item__wrapper">
              <span class="slider-item__label">Minion</span>
              <div class="slider-item__image">
                <img src="https://thanosmatsoukas.gr/wp-content/themes/thanosmatsoukas/public/images/codepen/3d-waving-cards/slider/slider-4.jpg" alt="">
              </div>
              <div class="slider-item__content">
                <h3 class="title">Cassian Mindbender</h3>
                <p class="description">In the hail of midnight discoveries you can find the Slide Item.</p>
              </div>
            </div>
          </div>
          <div class="slider-item">
            <div class="slider-item__wrapper">
              <span class="slider-item__label">Minion</span>
              <div class="slider-item__image">
                <img src="https://thanosmatsoukas.gr/wp-content/themes/thanosmatsoukas/public/images/codepen/3d-waving-cards/slider/slider-10.jpg" alt="">
              </div>
              <div class="slider-item__content">
                <h3 class="title">Lucius Thoughtguard</h3>
                <p class="description">In the hail of midnight discoveries you can find the Slide Item.</p>
              </div>
            </div>
          </div>
          <div class="slider-item">
            <div class="slider-item__wrapper">
              <span class="slider-item__label">Minion</span>
              <div class="slider-item__image">
                <img src="https://thanosmatsoukas.gr/wp-content/themes/thanosmatsoukas/public/images/codepen/3d-waving-cards/slider/slider-8.jpg" alt="">
              </div>
              <div class="slider-item__content">
                <h3 class="title">Thalia Mindtide</h3>
                <p class="description">In the hail of midnight discoveries you can find the Slide Item.</p>
              </div>
            </div>
          </div>
          <div class="slider-item">
            <div class="slider-item__wrapper">
              <span class="slider-item__label">Minion</span>
              <div class="slider-item__image">
                <img src="https://thanosmatsoukas.gr/wp-content/themes/thanosmatsoukas/public/images/codepen/3d-waving-cards/slider/slider-6.jpg" alt="">
              </div>
              <div class="slider-item__content">
                <h3 class="title">Aurora Mindseer</h3>
                <p class="description">In the hail of midnight discoveries you can find the Slide Item.</p>
              </div>
            </div>
          </div>
          <div class="slider-item">
            <div class="slider-item__wrapper">
              <span class="slider-item__label">Minion</span>
              <div class="slider-item__image">
                <img src="https://thanosmatsoukas.gr/wp-content/themes/thanosmatsoukas/public/images/codepen/3d-waving-cards/slider/slider-5.jpg" alt="">
              </div>
              <div class="slider-item__content">
                <h3 class="title">Selene Dreamstrider</h3>
                <p class="description">In the hail of midnight discoveries you can find the Slide Item.</p>
              </div>
            </div>
          </div>
          <!-- More slides -->
        </div>
      </div>
    </section>
              
            
!

CSS

              
                /* 1. INITIALIZATION STYLING STUFF YOU DON'T REALLY CARE ABOUT ( FOLLOW THE THESE NUMBERED COMMENTS ) */
body, html {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Prevents horizontal scroll */
}
div {
    box-sizing: border-box;
}
.container {
    max-width: 1440px;
    padding: 0 24px;
    margin: 0 auto;
    width: 100%;
}
.container-fluid {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
}
.section--body {
    padding: 0 0 120px;
    background-color: #000;
    margin-top: -164px;
}
.section--hero {
    padding: 260px 0 264px;
    background-color: #111;
    background-image: url(https://thanosmatsoukas.gr/wp-content/themes/thanosmatsoukas/public/images/codepen/3d-waving-cards/backgrounds/hero-background.jpg);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
}
.section--hero::before {
    position: absolute;
    content: "";
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: block;
    background-color: #000;
    opacity: 0.5;
}
.hero-content {
    position: relative;
}
.section--hero .title {
    color: #fff;
    font-size: 72px;
    margin: 0 0 16px;
    font-weight: 500;
}
.section--hero .description {
    margin: 0 0 16px;
}
.section--hero p {
    color: #cccccc;
}

/* 2. SLIDER STYLING STUFF. THE TRANSITIONS + THE .slider CLASS BELOW ARE IMPORTANT */
.slider {
    display: flex;
    flex-wrap: wrap;
    margin-left: -8px;
    margin-top: -8px;

    /* IMPORTANT PART*/
    transform-style: preserve-3d;
    transform: perspective(1000px);
}
.slider-item {
    width: 100%;
    max-width: 14.28%;
    flex: 0 0 14.28%;
   
    padding-left: 8px;
    padding-top: 8px;

    transition: all 0.3s ease-in-out;
    filter: brightness(1);
}

.slider-item__content {
    position: relative;
    z-index: 15;
}
.slider-item__image {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: block;
    z-index: 5;
}
.slider-item__image img {
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: block;
    object-fit: cover;
}
.slider-item__wrapper {
    background-color: #111;
    padding: 128px 16px 16px;
    color: #fff;
    position: relative;
    min-height: 320px;

    display: flex;
    align-items: end;
}
.slider-item__wrapper::before {
   content: "";
   width: 100%;
   height: 100%;
   position: absolute;
   display: block;
   top: 0;
   left: 0;
   right: 0;
   bottom: 0;
   background: rgb(0,0,0,0.5);
   background: linear-gradient(0deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.5) 100%);
   transition: all ease-out 0.5s;
   z-index: 10;
}
.slider-item__wrapper .title {
    color: #fff;
    font-size: 24px;
    margin: 0 0 4px 0;
    font-weight: 500;
    line-height: 1.05;
}
.slider-item__wrapper .description {
    color: #ececec;
    font-size: 12px;
    margin: 0;

    opacity: 0;
    height: 100%;
    max-height: 0;
    overflow: hidden;
    transition: all ease-out 0.8s;
}
.slider-item__label {
    position: absolute;
    top: 18px;
    left: 16px;
    background-color: #804ec3;
    color: #c6aeed;
    display: inline-block;
    padding: 6px 14px;
    border-radius: 14px;
    line-height: 1;
    z-index: 20;
    font-size: 12px;
    font-weight: 600;
}
.slider-item:hover .slider-item__wrapper::before {
    background: rgb(0,0,0,0.5);
    background: linear-gradient(0deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0) 100%);
}
.slider-item:hover .description {
    max-height: 150px;
    opacity: 1;
}

/* THE WAVING HOVER EFFECT ON THE NEXT + PREVIOUS SLIDER ELEMENTS */
.slider:hover .slider-item:not(:hover){
    filter: brightness(0.2) ;
}
.slider:hover .slider-item .slider-item__wrapper::before{
    backdrop-filter: blur(2px);
}
.slider .slider-item:hover {
    filter: brightness(1);
    transform: translateZ(164px);
}
.slider .slider-item:hover + * {
    filter: brightness(0.6) !important;
    transform: translateZ(112px) rotateY(20deg);
}
.slider .slider-item:hover + * + * {
    filter: brightness(0.4) !important;
    transform: translateZ(36px) rotateY(8deg);
}
.slider .slider-item:hover + * + * + * {
    filter: brightness(0.2) !important;
    transform: translateZ(15px) rotateY(5deg);
}
.slider .slider-item:has( + *:hover ) {
    filter: brightness(0.6) !important;
    transform: translateZ(112px) rotateY(-20deg);
}
.slider .slider-item:has( + * + *:hover ) {
    filter: brightness(0.4) !important;
    transform: translateZ(36px) rotateY(-8deg);
}
.slider .slider-item:has( + * + * + *:hover ) {
    filter: brightness(0.2) !important;
    transform: translateZ(15px) rotateY(-5deg);
}

/* BLUR THE slider-item__wrapper::before PSEUDO ELEMENT ON :HOVER */
.slider .slider-item:hover .slider-item__wrapper::before {
    backdrop-filter: blur(0) !important;
}
.slider .slider-item:hover + * .slider-item__wrapper::before {
    backdrop-filter: blur(0.7px) !important;
}
.slider .slider-item:hover + * + * .slider-item__wrapper::before {
    backdrop-filter: blur(1px) !important;
}
.slider .slider-item:hover + * + * + * .slider-item__wrapper::before {
    backdrop-filter: blur(2px) !important;
}
.slider .slider-item:has( + *:hover .slider-item__wrapper::before ) {
    backdrop-filter: blur(0.7px) !important;
}
.slider .slider-item:has( + * + *:hover .slider-item__wrapper::before ) {
    backdrop-filter: blur(1px) !important;
}
.slider .slider-item:has( + * + * + * :hover .slider-item__wrapper::before ) {
    backdrop-filter: blur(2px) !important;
}
              
            
!

JS

              
                document.getElementsByTagName("h1")[0].style.fontSize = "6vw";
              
            
!
999px

Console