LATEST >>

Welcome Here And Thanks For Visiting. Like Us On Facebook...

EXEIdeas – Let's Your Mind Rock » CSS Codes / HTML-CSS-PHP-JavaScript » Pure CSS 3D Cover Flow Image Swiper Slider

Pure CSS 3D Cover Flow Image Swiper Slider

Pure-CSS-3D-Cover-Flow-Image-Swiper-Slider
A 3D carousel is one of the most important components of a creative visual interface. It not only enhances the user experience but also attracts the user to stay longer on the page. There are many jQuery/JavaScript plugins to create a cover flow effect slider. But a general-purpose 3D coverflow image slider can be created with pure CSS. So, the benefit is that you don’t need to deal with JavaScript coding.

If you are new to CSS, maybe think how is it possible without JavaScript to functionalize the slider? well! for this purpose we’ll use the HTML radio input to get the checked/unchecked event in the CSS. Then we’ll functionalize the slider with a couple of special selectors.

There are many code snippets available online or on many other blogs and websites but everyone is not able to optimize your blog or website so you need some optimized code snippets. So now checkout out the code snippet for your blog and website that will give you all features for your desired code. Now grab the ready-to-use code and paste it where you want.

Table of Contents

Features:

  1. Light Weight.
  2. Pure CSS Code.
  3. Cross Browser.
  4. No External Files.
  5. Fully Customizable.
  6. Responsive.

How To Create 3D Rotating Images Slideshow Using Pure HTML and CSS?

There are a few easy and understandable steps to achieve your desired functionality that we are gonna share below. Follow each step perfectly.

CSS:

<style>
.container{position:relative;width:100%;height:400px;overflow:hidden}
.wgh-slider{position:relative;top:50%;width:100%;transform:translateY(-50%)}
.wgh-slider__viewport{position:relative;height:100%;width:100%}
.wgh-slider__viewbox{display:block;position:relative;perspective:100vw;margin:0 auto;width:33.3333333333%;max-width:280px;transform-style:preserve-3d;z-index:0}
.wgh-slider__viewbox::before{position:relative;top:0;left:0;display:block;content:"";height:0;padding-bottom:100%;width:100%}
.wgh-slider__container{position:absolute;top:0;left:0;bottom:0;right:0;transition:transform .3s cubic-bezier(0.62,0.28,0.23,0.99) .3s;transform-style:preserve-3d}
.wgh-slider-target{position:absolute;width:0;height:0;opacity:0;visibility:hidden}
input.wgh-slider-target{display:none}
.wgh-slider-target:first-of-type:last-of-type ~ .wgh-slider__viewport .wgh-slider-item:nth-child(1) .wgh-slider-item__trigger{display:none}
.wgh-slider-target:nth-of-type(1):checked ~ .wgh-slider__viewport .wgh-slider__container{transform:translateX(0%)}
.wgh-slider-target:nth-of-type(2):checked ~ .wgh-slider__viewport .wgh-slider__container{transform:translateX(-50%)}
.wgh-slider-target:nth-of-type(3):checked ~ .wgh-slider__viewport .wgh-slider__container{transform:translateX(-100%)}
.wgh-slider-target:nth-of-type(4):checked ~ .wgh-slider__viewport .wgh-slider__container{transform:translateX(-150%)}
.wgh-slider-target:nth-of-type(5):checked ~ .wgh-slider__viewport .wgh-slider__container{transform:translateX(-200%)}
.wgh-slider-target:nth-of-type(6):checked ~ .wgh-slider__viewport .wgh-slider__container{transform:translateX(-250%)}
.wgh-slider-target:nth-of-type(7):checked ~ .wgh-slider__viewport .wgh-slider__container{transform:translateX(-300%)}
.wgh-slider-target:nth-of-type(8):checked ~ .wgh-slider__viewport .wgh-slider__container{transform:translateX(-350%)}
.wgh-slider-item{display:block;position:absolute;top:0;left:0;width:100%;height:100%;opacity:1;transform:translate3d(0,0,0) rotateY(45deg);transition:transform .6s cubic-bezier(0.62,0.28,0.23,0.99) .15s}
.wgh-slider-item:nth-child(1){left:0}
.wgh-slider-item:nth-child(2){left:50%}
.wgh-slider-item:nth-child(3){left:100%}
.wgh-slider-item:nth-child(4){left:150%}
.wgh-slider-item:nth-child(5){left:200%}
.wgh-slider-item:nth-child(6){left:250%}
.wgh-slider-item:nth-child(7){left:300%}
.wgh-slider-item:nth-child(8){left:350%}
.wgh-slider-item__trigger{display:block;position:absolute;top:0;left:0;width:100%;height:100%;z-index:100;cursor:pointer}
.wgh-slider-target:nth-of-type(8):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(8) .wgh-slider-item__trigger,.wgh-slider-target:nth-of-type(7):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(7) .wgh-slider-item__trigger,.wgh-slider-target:nth-of-type(6):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(6) .wgh-slider-item__trigger,.wgh-slider-target:nth-of-type(5):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(5) .wgh-slider-item__trigger,.wgh-slider-target:nth-of-type(4):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(4) .wgh-slider-item__trigger,.wgh-slider-target:nth-of-type(3):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(3) .wgh-slider-item__trigger,.wgh-slider-target:nth-of-type(2):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(2) .wgh-slider-item__trigger,.wgh-slider-target:nth-of-type(1):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(1) .wgh-slider-item__trigger{display:none}
.wgh-slider-item__inner{position:relative;width:100%;height:100%;transform-origin:center center;transform:scale(0.75);transition:transform .3s cubic-bezier(0.62,0.28,0.23,0.99) 0;z-index:10}
.wgh-slider-item__inner::before,.wgh-slider-item__inner::after{display:block;position:absolute;content:""}
.wgh-slider-item__inner::before{top:24px;left:24px;bottom:24px;right:24px;z-index:0;transition:transform .3s cubic-bezier(0.62,0.28,0.23,0.99) .15s;transform:translate(-24px,12px);box-shadow:0 14px 28px rgba(0,0,0,0.25),0 10px 10px rgba(0,0,0,0.22)}
.wgh-slider-item__inner::after{top:0;left:0;width:100%;height:100%;z-index:1;background-image:linear-gradient(90deg,rgba(0,0,0,0) 0%,#000 50%,rgba(0,0,0,0) 100%);background-repeat:repeat-x;background-size:200% 100%;background-position:0 0;transition:background-position .3s linear}
.wgh-slider-target:nth-of-type(8):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(8) .wgh-slider-item__inner,.wgh-slider-target:nth-of-type(7):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(7) .wgh-slider-item__inner,.wgh-slider-target:nth-of-type(6):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(6) .wgh-slider-item__inner,.wgh-slider-target:nth-of-type(5):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(5) .wgh-slider-item__inner,.wgh-slider-target:nth-of-type(4):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(4) .wgh-slider-item__inner,.wgh-slider-target:nth-of-type(3):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(3) .wgh-slider-item__inner,.wgh-slider-target:nth-of-type(2):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(2) .wgh-slider-item__inner,.wgh-slider-target:nth-of-type(1):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(1) .wgh-slider-item__inner{transform:scale(1);transition-delay:.6s}
.wgh-slider-target:nth-of-type(8):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(8) .wgh-slider-item__inner::before,.wgh-slider-target:nth-of-type(7):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(7) .wgh-slider-item__inner::before,.wgh-slider-target:nth-of-type(6):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(6) .wgh-slider-item__inner::before,.wgh-slider-target:nth-of-type(5):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(5) .wgh-slider-item__inner::before,.wgh-slider-target:nth-of-type(4):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(4) .wgh-slider-item__inner::before,.wgh-slider-target:nth-of-type(3):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(3) .wgh-slider-item__inner::before,.wgh-slider-target:nth-of-type(2):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(2) .wgh-slider-item__inner::before,.wgh-slider-target:nth-of-type(1):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(1) .wgh-slider-item__inner::before{transform:translate(0,24px)}
.wgh-slider-target:nth-of-type(8):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(8) .wgh-slider-item__inner::after,.wgh-slider-target:nth-of-type(7):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(7) .wgh-slider-item__inner::after,.wgh-slider-target:nth-of-type(6):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(6) .wgh-slider-item__inner::after,.wgh-slider-target:nth-of-type(5):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(5) .wgh-slider-item__inner::after,.wgh-slider-target:nth-of-type(4):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(4) .wgh-slider-item__inner::after,.wgh-slider-target:nth-of-type(3):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(3) .wgh-slider-item__inner::after,.wgh-slider-target:nth-of-type(2):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(2) .wgh-slider-item__inner::after,.wgh-slider-target:nth-of-type(1):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(1) .wgh-slider-item__inner::after{background-position:-50% 0}
.wgh-slider-target:nth-of-type(8):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(8) ~ .wgh-slider-item .wgh-slider-item__inner::before,.wgh-slider-target:nth-of-type(7):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(7) ~ .wgh-slider-item .wgh-slider-item__inner::before,.wgh-slider-target:nth-of-type(6):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(6) ~ .wgh-slider-item .wgh-slider-item__inner::before,.wgh-slider-target:nth-of-type(5):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(5) ~ .wgh-slider-item .wgh-slider-item__inner::before,.wgh-slider-target:nth-of-type(4):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(4) ~ .wgh-slider-item .wgh-slider-item__inner::before,.wgh-slider-target:nth-of-type(3):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(3) ~ .wgh-slider-item .wgh-slider-item__inner::before,.wgh-slider-target:nth-of-type(2):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(2) ~ .wgh-slider-item .wgh-slider-item__inner::before,.wgh-slider-target:nth-of-type(1):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(1) ~ .wgh-slider-item .wgh-slider-item__inner::before{transform:translate(24px,12px)}
.wgh-slider-target:nth-of-type(8):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(8) ~ .wgh-slider-item .wgh-slider-item__inner::after,.wgh-slider-target:nth-of-type(7):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(7) ~ .wgh-slider-item .wgh-slider-item__inner::after,.wgh-slider-target:nth-of-type(6):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(6) ~ .wgh-slider-item .wgh-slider-item__inner::after,.wgh-slider-target:nth-of-type(5):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(5) ~ .wgh-slider-item .wgh-slider-item__inner::after,.wgh-slider-target:nth-of-type(4):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(4) ~ .wgh-slider-item .wgh-slider-item__inner::after,.wgh-slider-target:nth-of-type(3):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(3) ~ .wgh-slider-item .wgh-slider-item__inner::after,.wgh-slider-target:nth-of-type(2):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(2) ~ .wgh-slider-item .wgh-slider-item__inner::after,.wgh-slider-target:nth-of-type(1):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(1) ~ .wgh-slider-item .wgh-slider-item__inner::after{background-position:-100% 0}
.wgh-slider-item-figure{position:relative;width:100%;height:100%;margin:0;padding:0;overflow:hidden}
.wgh-slider-item-figure__image{position:absolute;display:block;max-width:100%;max-height:100%;left:0;right:0;top:0;bottom:0;z-index:1;opacity:1}
.wgh-slider-item-figure__caption{position:absolute;display:block;overflow:hidden;left:0;right:0;bottom:0;color:#fff;padding:24px;background-image:linear-gradient(0deg,#000 0%,transparent 100%);z-index:2}
.wgh-slider-item-figure__caption a{display:inline-block;text-decoration:none;font-size:18px;line-height:20px;font-weight:700;color:#fff}
.wgh-slider-item-figure__caption span{display:block;font-size:14px;line-height:16px}
.wgh-slider-target:nth-of-type(8):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(8),.wgh-slider-target:nth-of-type(7):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(7),.wgh-slider-target:nth-of-type(6):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(6),.wgh-slider-target:nth-of-type(5):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(5),.wgh-slider-target:nth-of-type(4):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(4),.wgh-slider-target:nth-of-type(3):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(3),.wgh-slider-target:nth-of-type(2):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(2),.wgh-slider-target:nth-of-type(1):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(1){transform:translate3d(0,0,0) rotateY(0deg);z-index:9999}
.wgh-slider-target:nth-of-type(8):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(8) ~ .wgh-slider-item,.wgh-slider-target:nth-of-type(7):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(7) ~ .wgh-slider-item,.wgh-slider-target:nth-of-type(6):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(6) ~ .wgh-slider-item,.wgh-slider-target:nth-of-type(5):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(5) ~ .wgh-slider-item,.wgh-slider-target:nth-of-type(4):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(4) ~ .wgh-slider-item,.wgh-slider-target:nth-of-type(3):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(3) ~ .wgh-slider-item,.wgh-slider-target:nth-of-type(2):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(2) ~ .wgh-slider-item,.wgh-slider-target:nth-of-type(1):checked ~ .wgh-slider__viewport .wgh-slider-item:nth-child(1) ~ .wgh-slider-item{transform:translate3d(0,0,0) rotateY(-45deg)!important}
</style>

HTML:

<!-- partial:index.partial.html -->
<div class="container">
<div class="wgh-slider">
<input class="wgh-slider-target" type="radio" id="slide-1" name="slider"/>
<input class="wgh-slider-target" type="radio" id="slide-2" name="slider"/>
<input class="wgh-slider-target" type="radio" id="slide-3" name="slider" checked="checked"/>
<input class="wgh-slider-target" type="radio" id="slide-4" name="slider"/>
<input class="wgh-slider-target" type="radio" id="slide-5" name="slider"/>
<div class="wgh-slider__viewport">
<div class="wgh-slider__viewbox">
<div class="wgh-slider__container">
<div class="wgh-slider-item">
<div class="wgh-slider-item__inner">
<figure class="wgh-slider-item-figure"><img class="wgh-slider-item-figure__image" src="https://codeconvey.com/Tutorials/pure-css-coverflow-slider/img/image-1.jpg" alt="The 5th Exotic"/>
<figcaption class="wgh-slider-item-figure__caption"><a href="https://f4.bcbits.com/img/a3905613628_16.jpg">The 5th Exotic</a><span>Quantic</span></figcaption>
</figure>
<label class="wgh-slider-item__trigger" for="slide-1" title="Show product 1"></label>
</div>
</div>
<div class="wgh-slider-item">
<div class="wgh-slider-item__inner">
<figure class="wgh-slider-item-figure"><img class="wgh-slider-item-figure__image" src="https://codeconvey.com/Tutorials/pure-css-coverflow-slider/img/image-2.jpg" alt="The 5th Exotic"/>
<figcaption class="wgh-slider-item-figure__caption"><a href="https://f4.bcbits.com/img/a3905613628_16.jpg">The 5th Exotic</a><span>Quantic</span></figcaption>
</figure>
<label class="wgh-slider-item__trigger" for="slide-2" title="Show product 2"></label>
</div>
</div>
<div class="wgh-slider-item">
<div class="wgh-slider-item__inner">
<figure class="wgh-slider-item-figure"><img class="wgh-slider-item-figure__image" src="https://codeconvey.com/Tutorials/pure-css-coverflow-slider/img/image-3.png" alt="The 5th Exotic"/>
<figcaption class="wgh-slider-item-figure__caption"><a href="https://f4.bcbits.com/img/a3905613628_16.jpg">The 5th Exotic</a><span>Quantic</span></figcaption>
</figure>
<label class="wgh-slider-item__trigger" for="slide-3" title="Show product 3"></label>
</div>
</div>
<div class="wgh-slider-item">
<div class="wgh-slider-item__inner">
<figure class="wgh-slider-item-figure"><img class="wgh-slider-item-figure__image" src="https://codeconvey.com/Tutorials/pure-css-coverflow-slider/img/image-4.jpg" alt="The 5th Exotic"/>
<figcaption class="wgh-slider-item-figure__caption"><a href="https://f4.bcbits.com/img/a3905613628_16.jpg">The 5th Exotic</a><span>Quantic</span></figcaption>
</figure>
<label class="wgh-slider-item__trigger" for="slide-4" title="Show product 4"></label>
</div>
</div>
<div class="wgh-slider-item">
<div class="wgh-slider-item__inner">
<figure class="wgh-slider-item-figure"><img class="wgh-slider-item-figure__image" src="https://codeconvey.com/Tutorials/pure-css-coverflow-slider/img/image-5.jpg" alt="RYSY - Traveler LP"/>
<figcaption class="wgh-slider-item-figure__caption"><a href="https://picsum.photos/id/237/480/480">RYSY - Traveler LP</a><span>RYSY</span></figcaption>
</figure>
<label class="wgh-slider-item__trigger" for="slide-5" title="Show product 5"></label>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- partial -->

Customization:

No need to customize it. Just copy-paste. Rest edit the code as per comments and need. Remember to add JavaScript after HTML code.

Recommended For You:
How To Remove Or Strip All HTML Tags In Content Using Pure JavaScript?

Troubleshooting the Errors:

Do it with concentration and patience. Check your all steps and again and all codes or scripts. If you find any error you can contact us anytime via comment or better via email, We are always here to help you.

Final Words:

That’s all we have. We hope that you liked this article. If you have any problem with this code in your template then feel free to contact us with a full explanation of your problem. We will reply to you as time allows us If you have any doubts or problems please comment below. We are happy to help you! If you liked this article, Don’t forget to share this with your friends so they can also take benefit from it and leave.

You Like It, Please Share This Recipe With Your Friends Using...

Be the first to write a comment.

Leave a Reply

Your email address will not be published. Required fields are marked *