Skip to main content

Create Flip Card Hover Effect with HTML & CSS

 

#flipcard #hover #effect #html #css #foryou #world #happy # website #webdesign #webdeveloper #how to #howto #trending #viral #srilanka #youtube #tiktok #blog  #howtocreate #Javascript #image #imageuploader #hulk #spiderman #superman 


In this step-by-step tutorial, we'll show you how to create an awesome flip card with a smooth hover effect using HTML and CSS. Flip cards are a great way to add interactivity and engagement to your website. Whether you want to showcase product details, team members, or just add a fun element to your web page, this tutorial has got you covered. Don't forget to like, share, and subscribe for more web development tutorials and tips. If you have any questions or need further assistance, feel free to leave a comment, and we'll be happy to help you out. Happy coding!


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>Hover Cards</title>
</head>
<body>
  <a href="#">
    <div class="card">
        <div class="wrapper">
            <img src="Image/Spider BG.jpg" alt="spider" class="image">
        </div>
        <div class="character">
            <img src="Image/Spider 2.png" alt="spider" class="character">
        </div>
    </div>
  </a>

  <a href="#" class="hulk">
    <div class="card">
        <div class="wrapper">
            <img src="Image/Hulk-BG.jpg" alt="spider" class="image">
        </div>
        <div class="character">
            <img src="Image/Hulk.png" alt="spider" class="character">
        </div>
    </div>
  </a>
</body>
</html>


style.css

*{
    box-sizing: border-box;
}
body{
    width: 100vw;
    height: 100vh;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: url(Image/wall.jpg);
}
:root{
    --card-height:300px;
    --card-width:calc(var(var(--card-height)/1.5));
}
.card{
    margin: 60px 100px;
    padding: 60px 60px;
    display: flex;
    width: var(--card-width);
    height: var(--card-height);
    position: relative;
    justify-content: center;
    align-items: flex-end;
    perspective: 2500px;
}
.image{
    width: 250px;
    height: 100%;
    object-fit: cover;
}
.wrapper{
    width: 210%;
    position: absolute;
    transition: all 0.5s;
    z-index: -1;
}
.wrapper:hover{
    transform: rotateX(50deg);
}
.card:hover .wrapper{
    box-shadow: 5px 20px 20px -5px rgba(180,45,45,0.75);
    transform: perspective(9000px) translateY(2%) rotateX('25deg')
    rotateZ(0deg);
    --webkit-box-shadow:5px 20px 20px -5px rgba(180,45,45,0.75);
    --moz-box-shadow:5px 20px 20px -5px rgba(180,45,45,0.75);
    position: absolute;
}
.wrapper::before, .wrapper::after{
    content: '';
    opacity: 0;
    width: 100%;
    height: 150px;
    left: 0;
    position: absolute;
    transition: all 0.5s;
}
.wrapper::before{
    top: 0;
    height: 100%;
    background-image: linear-gradient(to top, transparent 50%),
    rgba(12,13,19,0.5) 68%,
    rgba(12,13,19)97%;
}
.wrapper::after{
    bottom: 0;
    opacity: 1;
    background-image: linear-gradient(to bottom, transparent 46%),
    rgba(12,13,19,0.5)68%,
    rgba(12,13,19)97%;
}
.card:hover .wrapper::before, .wrapper::after{
    opacity: 1;


}
.card:hover .wrapper::after{
    height: 120px;
}
.character{
    width: 150px;
    opacity: 0;
    transition: all 0.5s;
    position: absolute;
    z-index: 1;
    transform: translate3d(2px , -170px , -90px);
}
.card:hover .character{
    opacity: 1;
    transform: translate3d(0% -30px 10px );
}
a{
    padding-top: 90px;
}
.hulk:hover .wrapper{
    box-shadow: 5px 20px 20px -5px rgba(45,180,92,0.75);
    transform: perspective(9000px) translateY(2%) rotateX('25deg')
    rotateZ(0deg);
    --webkit-box-shadow:5px 20px 20px -5px rgba(45,180,92,0.75);
    --moz-box-shadow:5px 20px 20px -5px rgba(45,180,92,0.75);
    position: absolute;


}
.hulk .character{
    width: 200px;
}









































































Comments

Popular posts from this blog

Build a Simple Calculator Using HTML, CSS and JavaScript | Step-by-Step Tutorial

    You'll learn how to create a fully functional calculator using #html #css and #javascript . Follow along as we break down the process into easy-to-understand steps, from designing the user interface with HTML and CSS to adding interactive functionality with JavaScript. 🔹 Learn the fundamentals of HTML, CSS, and JavaScript. 🔹 Design a sleek and user-friendly calculator interface. 🔹 Implement basic arithmetic operations, including addition, subtraction, multiplication, and division. 🔹 Handle user input and display results in real-time. 🔹 Enhance the calculator with clear functionality. 🔹 Perfect for web development beginners and anyone looking to sharpen their skills. By the end of this tutorial, you'll have your very own #calculator that you can showcase in your web development portfolio. index.html <! DOCTYPE html > < html lang = "en" > < head >     < meta charset = "UTF-8" >     < meta name = "viewport...

Parallax Scrolling Website Effect Using HTML CSS

  Welcome to our step-by-step tutorial on creating Parallax Scrolling Website Effect using #html  & #css  . In this video, we'll guide you through the process of building a simple yet effective Parallax Effect 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 this effect 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 > Parallax Scrolling Website </ title >     ...

How To Create a Sign Up Form Using HTML & CSS

    In this tutorial, we'll guide you through the process of creating a standard sign-up form using HTML and CSS. It's a fundamental skill for anyone interested in web development or design. This tutorial is suitable for beginners and provides a solid foundation for understanding how to create a sign-up form. If you're interested in web development or web design, this is a crucial skill to master. If you find this video helpful, please consider liking and subscribing for more web development tutorials. Let's start building your sign-up form together!  1.Create a New Folder 2.Open the Folder in Vs Code  3.Create index.html and style.css Files  4.Create Image Folder and download  Background picture to Image folder 5.Begin Coding  index.html  <! DOCTYPE html > < html lang = "en" > < head >     < meta charset = "UTF-8" >     < meta name = "viewport" content = "width=device-width, initial-scale=1.0" ...