Skip to content

Commit

Permalink
Added customize radio button
Browse files Browse the repository at this point in the history
  • Loading branch information
sachinsaini4278 authored Jan 20, 2022
0 parents commit cd3f1cc
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
17 changes: 17 additions & 0 deletions customize radion button/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!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>Document</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<input type="radio" name="btn" id="html"><label for="html">HTML</label>
<input type="radio" name="btn" id="css"><label for="css">CSS</label>
<input type="radio" name="btn" id="js"><label for="js">JavaScript</label>
</div>
</body>
</html>
27 changes: 27 additions & 0 deletions customize radion button/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
.container{
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.container input[type="radio"]{
/* width: 0;
opacity: 0; */
display: none;
}
.container label{
background-color: blanchedalmond;
padding: 20px;
border:2px solid black;
border-radius: 10px;
cursor: pointer;
transition: all 0.3s;
margin:10px;
}
.container label:hover{
background-color: rgb(116, 101, 101);
transform: scale(1.2);
}
.container input[type="radio"]:focus+label{
background-color: green;
}

0 comments on commit cd3f1cc

Please sign in to comment.