Skip to main content

Designing Stylish Checkboxes with HTML and CSS

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

 In this tutorial, we'll explore the art of creating visually appealing checkboxes using HTML and CSS. Checkboxes are a fundamental component of web forms, but that doesn't mean they have to be boring! Join us as we dive into the world of web design and learn how to customize checkboxes to match your website's style and branding.

1.Create a New Folder

2.Open the Folder in Vs Code 

3.Create index.html and style.css Files 

4.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>Check Box</title>
</head>
<body>
    <div class="container">
        <div class="card">
            <div class="row">
                <p>Subscribe</p>
                    <label>
                        <input type="checkbox" checked="" >
                        <span></span>
                    </label>
               
            </div>

            <div class="row">
                <p>Like</p>
                    <label>
                        <input type="checkbox" checked="checked">
                        <span></span>
                    </label>
               
            </div>

            <div class="row">
                <p>Comment</p>
                    <label>
                        <input type="checkbox" checked="checked">
                        <span></span>
                    </label>
               
            </div>

            <div class="row">
                <p>Share</p>
                    <label>
                        <input type="checkbox" checked="checked">
                        <span></span>
                    </label>
               
            </div>
        </div>
    </div>
</body>
</html>

style.css 

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins",sans-serif;
}
.container{
    width: 100%;
    height: 100vh;
    background-color: black;
    display: flex;
    justify-content: center;
    align-items: center;
}
.card{
    width: 500px;
    padding: 25px 40px 25px 25px;
    box-shadow: 0 25px 45px rgba(0,0,0,0.2);
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.5);
    border-right: 2px solid rgba(255,255,255,0.2);
    border-bottom: 2px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
}
.row{
    align-items: center;
    display: flex;
    margin: 20px 0;
    justify-content: space-between;
    font-size: 25px;
    color: white;
}
label{
    position: relative;
    width: 50px;
    height: 50px;
}
input{
    width: 100%;
    height: 100%;
    opacity: 0;
    position: absolute;
}
label span{
    width: 75px;
    height: 100%;
   display:block;
    position: absolute;
    cursor: pointer;
    border: 3px solid white;
    border-radius: 5px;
   
   
}
label span::after{
    content: '';
    position: absolute;
    width: 20px;
    height: 40px;
    left: 24px;
    bottom: 10px;
    border: solid blue;
    border-width: 0 6px 6px 0;
    transform: rotate(45deg);
    opacity: 0;
    transition:width 0.5s, height 0.5s , opacity 0.5s;

}
input:checked ~ span::after{
    width: 15px;
    height: 30px;
    opacity: 1;
}
  




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