Checkbox styles using HTML and CSS with hover effect





We are seeing different types of checkboxes now a days in different forms. But this is a different one, try this new checkbox with the hover effect that makes a red background while the cursor moves into each of the checkbox. 

When we try to click and stay the cursor for 2 seconds then the background of the checkbox becomes green. The green icon is made with the pseudo element active.

Live Preview:


checkbox
Java
Python
Sql


Try this live preview to check the functions of the checkbox that I created. It is shows red colour when I clicked on the checkbox or when I clicked on the definition of the checkbox. Try to keep the cursor on the check box for a few seconds the colour of the the checkbox which is fraud changes to green. When I take back the  cursor, all of the colour changes and the checkbox becames colourless. This is how the working of the checkbox that I created.


Video Preview:





This video shows the working of the checkbox with hover effect. You can better try the checkbox directly by the live Preview section which is on the top.


The code of the checkbox is given below

Code:



<html>
<head>
<title>checkbox created by cspsyco.blogspot.com </title>
<style>
.div1
{
border-radius:5px;
align:center;
border:2px solid black;
padding:10px;
width:100px;
}
.div2
{
display:flex;
}
.div2:hover
{

border-radius:5px;
background-color:red;
}
.div2:active
{

border-radius:5px;
background-color:green;
transition:1s;
}
</style>
</head>
<body><br><br><br><br><br><br><br><br><br><br>
<center>
<div class=div1>
<div class=div2>
<input type=checkbox class=in>Java</div>
<div class=div2>
<input type=checkbox class=in>Python</div>
<div class=div2>
<input type=checkbox class=in>Sql
</div></div>
</center>
</body>
</html>

Comments

Popular posts from this blog

Node.js Cheat Sheet

Codeigniter ! Simple But Powerful

Introducing Cloudflare Pages ⚡