3D picture carousel css

Size
3,065 Kb
Views
4,048

How do I make an 3d picture carousel css?

What is a 3d picture carousel css? How do you make a 3d picture carousel css? This script and codes were developed by Jimmy Van Der Sleen on 15 January 2023, Sunday.

3D picture carousel css Previews

3D picture carousel css - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>3D picture carousel css</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div id="wrapper"> <div class="card active"> <img src="http://lorempixel.com/sports/600/600/"> </div> <div class="card"> <img src="http://lorempixel.com/food/600/600/"> </div> <div class="card"> <img src="http://lorempixel.com/cats/600/600/"> </div> <div class="card"> <img src="http://lorempixel.com/city/600/600/"> </div> <div class="card"> <img src="http://lorempixel.com/people/600/600/"> </div> <div class="card"> <img src="http://lorempixel.com/nature/600/600/"> </div> <div class="card"> <img src="http://lorempixel.com/abstract/600/600/"> </div> <div class="card"> <img src="http://lorempixel.com/fashion/600/600/"> </div>
</div>
<button class="next"> >| </button>
<button class="prev"> |< </button> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

3D picture carousel css - Script Codes CSS Codes

body { background-image: url("https://s-media-cache-ak0.pinimg.com/originals/97/71/af/9771af6a324ac7fac6dd7b1aa859a5a3.jpg"); background-size: cover;
}
#wrapper { height: 100vh; width: 100vw; -webkit-perspective: 1200; perspective: 1200; -webkit-perspective-origin: 50% 20%; perspective-origin: 50% 20%; -webkit-transform-style: preserve-3d; transform-style: preserve-3d; -webkit-transition: all 0.1s; transition: all 0.1s;
}
#wrapper .card { position: absolute; width: 180px; height: 180px; top: calc(50% - 100px); left: calc(50% - 100px); background-color: #000000; margin: 10px; -webkit-transition: all 1s; transition: all 1s; border: 4px solid #FFF;
}
#wrapper .card img { width: 100%; display: block;
}
#wrapper .card.active { width: 300px; height: 300px; top: calc(50% - 160px); left: calc(50% - 160px);
}
button { position: fixed; top: 0; height: 100%; width: 200px; background: rgba(255, 255, 255, 0.3); border: none; color: #fff; font-size: 3em; outline: none; cursor: pointer;
}
button:hover { background: rgba(255, 255, 255, 0.5);
}
.next { right: 0;
}
.prev { left: 0;
}

3D picture carousel css - Script Codes JS Codes

var angle = Math.round(360 / 8);
var rotation = 0;
$('.next').click(nextCard);
$('.prev').click(prevCard);
setCards();
function setCards() { $('.card').each( function ( index ) { $(this).css({ 'transform': 'rotateY('+ (index * angle + rotation) +'deg) translateZ(420px)' }); });
}
function nextCard() { rotation -= angle; var active = $('.active'); $('.active').removeClass('active'); if(active.next().length === 0){ $('.card').first().addClass('active'); } else { active.next().addClass('active'); } setCards();
}
function prevCard() { rotation += angle; var active = $('.active'); $('.active').removeClass('active'); if(active.prev().length === 0){ $('.card').last().addClass('active'); } else { active.prev().addClass('active'); } setCards();
}
3D picture carousel css - Script Codes
3D picture carousel css - Script Codes
Home Page Home
Developer Jimmy Van Der Sleen
Username sjimster
Uploaded January 15, 2023
Rating 3
Size 3,065 Kb
Views 4,048
Do you need developer help for 3D picture carousel css?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Jimmy Van Der Sleen (sjimster) Script Codes
Create amazing captions with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!