Skip to main content

How to Create a 3D Image Gallery Using HTML & CSS

 

#3d #gallery #image  #html #css #foryou #world #happy # website #webdesign #webdeveloper #how to #howto #trending #viral #srilanka #youtube #tiktok #blog  #howtocreate #Javascript #image #imageuploader 


🌟 Dive into the world of web design with our latest tutorial! Learn step-by-step how to create a stunning 3D Image Gallery using HTML and CSS. 🖼️💻 Elevate your website with this easy-to-follow guide, perfect for beginners and enthusiasts alike. Impress your audience with a visually engaging gallery that adds a touch of modern flair to your online presence. Watch, learn, and transform your web design skills today! 🔧✨ #webdesign #html #css #tutorial

index.html

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="style.css">
    <title>3D Image Gallery </title>
</head>
<body>
    <div class="slider">
        <span style="--i:1"><img src="Images/Animeted Loading Button.jpg"
            alt="Animated Loading Button"></span>
        <span style="--i:2"><img src="Images/Calculator.jpg"
            alt="Calculator"></span>
        <span style="--i:3"><img src="Images/Check Box.jpg"
            alt="Check Box"></span>
        <span style="--i:4"><img src="Images/Logo Hover.jpg"
            alt="Logo Hover"></span>
        <span style="--i:5"><img src="Images/Netflix.jpg"
            alt="Netflix"></span>
        <span style="--i:6"><img src="Images/QR Code Genarator.jpg"
            alt="QR Code Genarator"></span>
        <span style="--i:7"><img src="Images/Sign Up.jpg"
            alt="Sign Up"></span>
        <span style="--i:8"><img src="Images/Solar System.jpg"
            alt="Solar System"></span>
    </div>
    <script>
        const slides = document.querySelectorAll('.slide');
slides.forEach((slide, index) => {
    slide.style.setProperty('--i', index);
});
    </script>
</body>
</html>

style.css

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body{
    background: linear-gradient(to right,rgb(73, 55, 55),gray);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.slider{
    position: relative;
    width: 125px;
    height: 150px;
    transform-style:preserve-3d ;
    animation: rotate 60s linear infinite;
}
@keyframes rotate {
    0%{
        transform:perspective(1000px) rotateY(0deg);
    }
    100%{
        transform:perspective(1000px) rotateY(360deg);
    }
}
.slider span{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height:100%;
    transform-origin:center ;
    transform-style:preserve-3d;
    transform:rotateY(calc(var(--i)*45deg))translateZ(350px) ;
}
.slider span img{
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height:100%;
    border-radius: 5px;
    object-fit: cover;
    transition: 0.5s;
}
.slider span:hover img{
    transform: translateY(-50px) scale(1);
    cursor:pointer;
}

.slider:hover{
    animation-play-state: paused;
}









































Comments

Popular posts from this blog

How to Build Your Own Image Uploader using HTML, CSS, and JS Tutorial

    Welcome to our step-by-step tutorial on creating your own image uploader using #html  , #css  , and JavaScript. In this video, we'll guide you through the process of building a simple yet effective image uploader for your web projects. With just a few lines of code, you'll learn how to create a user-friendly interface that allows users to upload images seamlessly. Whether you're a beginner or an experienced developer looking to enhance your skills, this tutorial is perfect for you. Follow along and empower yourself to create dynamic web applications with ease! Don't forget to like, share, and subscribe for more coding tutorials. Let's get started!  index.html   <! DOCTYPE html > < html lang = "en" > < head >     < meta charset = "UTF-8" >     < meta name = "viewport" content = "width=device-width, initial-scale=1.0" >     < title > Drag & Drop Image Uploader </ title >...

Create an Animated Switch with HTML and CSS in 2024

  Create an Animated Switch with HTML and CSS in 2024 Learn how to create an animated switch using HTML and CSS in 2024! This tutorial will guide you through the process of building a sleek and modern switch element for your website. Enhance your web development skills and stay up-to-date with the latest design trends by mastering this technique. Watch now to level up your front-end development game!  index.html  <! DOCTYPE html > < html lang = "en" > < head >     < meta charset = "UTF-8" >     < meta name = "viewport" content = "width=device-width, initial-scale=1.0" >     < title > Document </ title >     < link rel = "stylesheet" href = "style.css" > </ head > < body >     < label class = "switch" >         < input type = "checkbox" checked = "checked" >         < div class = "button" >  ...

Animated Switch

    index.html <! DOCTYPE html > < html lang = "en" > < head >     < meta charset = "UTF-8" >     < meta name = "viewport" content = "width=device-width, initial-scale=1.0" >     < title > Document </ title >     < link rel = "stylesheet" href = "style.css" > </ head > < body >     < label class = "switch" >         < input class = "cb" type = "checkbox" />         < span class = "toggle" >           < span class = "left" > off </ span >           < span class = "right" > on </ span >         </ span >       </ label >       </ body > </ html > style.css  /* The switch - the box around the slider */ .switch {     font-size : 17px ; ...