Website Design Using html and css | Customize Check Box Design With hover animation using html and css
Learn How to make a Customize Check Box Design With hover animation using html and css . latest page UI design with HTML and CSS. Web site Design Tutorial
Video Tutorial
Google Fonts Link Click Here
How to use the code in stpe by step
- Open Your text Editor(like: VS code, SublimeText or Notepad++)
- Create a .html(like: index.html) file
- Copy the HTML code the code and past in the index.html file
- Then, Create a .css(like: style.css) file
- Copy the CSS code and past in style.css file
- Open the file in your browser
HTML CODE
HTML is a standard language for web page. With HTML you can create your own website. HTML is easy to learn - You will enjoy it
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Check List</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1>Customize Check List</h1>
<div class="main">
<ul>
<li>
<input type="checkbox" id="Item1">
<label for="Item1">List Item 1</label>
</li>
<li>
<input type="checkbox" id="Item2">
<label for="Item2">List Item 2</label>
</li>
<li>
<input type="checkbox" id="Item3">
<label for="Item3">List Item 3</label>
</li>
<li>
<input type="checkbox" id="Item4">
<label for="Item4">List Item 4</label>
</li>
<li>
<input type="checkbox" id="Item5">
<label for="Item5">List Item 5</label>
</li>
</ul>
</div>
</body>
</html>
CSS CODE
The Full from of CSS is Cascading Style Sheets. It explains how to show HTML elemnts on display. For web designers, it is powerfull tool to adjust the design and control of the web pages t demonstrate how they should be viewed.
@import url('https://fonts.googleapis.com/css2?family=Lato&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Lobster&display=swap');
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body{
width: 100%;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background: #8b06b3;
font-size: 25px;
font-family: 'Lato', sans-serif;
}
h1{
background-color: #90d5ec;
background-image: linear-gradient(315deg, #90d5ec 0%, #fc575e 75%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
font-family: 'Lobster', cursive;
}
.main{
width: 450px;
height: 300x;
display: flex;
align-items: center;
position: relative;
}
ul{
width: 100%;
margin-left: 20px;
list-style: none;
}
ul li{
width: 80%;
height: 50px;
background: #fff;
display: flex;
align-items: center;
margin: 1em 2em;
z-index: 10;
cursor: pointer;
position: relative;
border-radius: 5px;
transition: all .4s;
}
ul li::before{
content: '';
position: absolute;
top: 0;
left: 0;
width: 25px;
height: 100%;
background: #961167;
border-radius: 5px 0 0 5px;
z-index: -1;
transition: all .4s;
}
ul li:hover::before{
width: 100%;
}
ul li:hover{
overflow: hidden;
color: #fff;
}
label{
padding-left: 20px;
cursor: pointer;
width: 100%;
position: absolute;
height: 100%;
margin-right: 20px;
border-radius: 0 5px 5px 0;
padding-top: 6px;
outline: none;
}
.main input{
opacity: 0;
outline: none;
}
.main input:checked ~ label{
background-color: #961167;
color: #fff;
transition: all .4s;
}
No comments: