day and night css animation web design

 

day and night html and css animation

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="utf-8">

<title>Custom checkbox</title>

<style>

body{

margin: 0;

padding: 0;

display:flex;

justify-content:center;

align-items: center;

min-height:100vh;

}

input[type="checkbox"]

{

-webrit-oppearance: none;

visibility:hidden;

display:none;

}

.check{

position:relative;

display:block;

width:40px;

height:20px;

background:#092c3e;

cursor:pointer;

border-radius:20px;

overflow:hidden;

transition: ease-in 0.5s;

}

input[type="checkbox"]:checked ~ .check

{

background:#fff;

box-shadow: 0 0 0 1200px #092c3e;

}

.check:before

{

content:'';

position:absolute;

top:2px;

left:2px;

background:#fff;

width:16px;

height:16px;

border-radius:50%;

transition:0.5s;

}

input[type="checkbox"]:checked ~ .check:before

{

transform:translateX(-50px);

}

.check:after

{

content:'';

position:absolute;

top:2px;

left:2px;

background:#092c3e;

width:16px;

height:16px;

border-radius:50%;

transition:0.5s;

transform:translateX(50px);

}

input[type="checkbox"]:checked ~ .check:after

{

transform:translateX(0px);

}

</style>

</head>

<body>   

<label>

<input type="checkbox">

<span class="check"></span>

</label>

</body>

</html>


Html table tag 

Tags

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.