Skip to main content

Create Cool Hover Effects for Cards with HTML & CSS (2024)

 




Learn how to create stylish hover effects for cards using HTML and CSS in this tutorial. Watch step-by-step as we implement eye-catching animations to make your website's cards stand out. Perfect for web developers looking to enhance user experience and add a touch of interactivity to their projects. Get ready to impress with cool hover effects for cards! 
Stay tuned for more web development tutorials.

index.html 
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Card</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>
    <div class="card">
        <img src="Image/paris_eiffeltower_ssk500.jpeg" alt="EiffelTower">
        <div class="card-content">
            <h1 class="title">Eiffel Tower</h1>
            <p class="sub-title">Tower in Paris, France
            </p>
            <p class="text">The Eiffel Tower is a wrought-iron lattice tower on the Champ de Mars in Paris, France. It is named after the engineer Gustave Eiffel, whose company designed and built the tower from 1887 to 1889</p>
             <button class="card-button">Visit More</button>
        </div>
    </div>
</body>
</html>

style.css

*{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: 'Times New Roman', Times, serif;
}
body{
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgb(30, 63, 113);
    height: 100vh;
    width: 100%;
}
.card{
    height: 500px;
    width: 350px;
    border: 5px solid black;
    border-radius: 25px;
    position: relative;
    overflow: hidden;
}
.card img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius:20px ;
}
.card-content{
    width: 100%;
    height: 100%;
    position: absolute;
    right:-100%;
    top: 0;
    background-color: rgb(22, 65, 100);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    transition: 0.5s;

}
.card:hover .card-content{
    right: 0;
}
.title{
font-size: 1.8em;
color: white;
text-align: center;
}
.sub-title{
font-size: 1.5em;
color: antiquewhite;
text-align: center;
}
.text{
color: aqua;
padding-top: 25px;
text-align: center;
font-size: 1.2em;
}
.card-button{
color:white ;
background:rgb(16, 35, 64) ;
margin: 35px 80px;
padding: 10px;
border-radius: 10px;
font-size: 1.1em;
cursor: pointer;
}






















Comments

Popular posts from this blog

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" >

How to Create Solar System Using HTML & CSS

  🌟 Explore the Universe: Building a Solar System with HTML and CSS! 🌟 Welcome to another mind-blowing adventure on @Coding With Nexus ! 🚀 Join us as we embark on an interstellar journey to create our very own solar system using nothing but HTML and CSS. 🌌 First Create a New Folder, Then 1.Open the folder in Vs Code 2.Create index.html and style.css Files 3.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" >     < link rel = "stylesheet" href = "style.css" >     < title > Solar System </ title > </ head > < body >     < div class = "container" >         < div class = "sun" ></ div >         < div class = "earth" >             < div class = "moon" ></

How to Create Animate Mic Logo

    Embark on a design and coding adventure with our tutorial on creating and animating a microphone logo using HTML and CSS. In this concise yet comprehensive guide, we'll navigate logo design principles, emphasizing simplicity and visual balance. Seamlessly transitioning to animation, we'll bring the mic logo to life, making it dynamic and engaging. What sets this tutorial apart is its accessibility—no complex software, just the power of code.🎙️✨ #logoanimation #designtutorial #webdevelopment 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! Like Us On Facebook:    / codingwithnexusofficial   Follow Us On Instagram:    / coding_with_nexus   Follow Us On TikTok:    / coding.with.nexus  index.html <! DOCTYPE html > < html lang = "en" > < head >     < meta