Spear checkboxes

Developer
Size
3,682 Kb
Views
18,216

How do I make an spear checkboxes?

Tiny spear that fly in to mark the boxes. These are not at all accessible, practical or functional.. What is a spear checkboxes? How do you make a spear checkboxes? This script and codes were developed by Ross B on 24 November 2022, Thursday.

Spear checkboxes Previews

Spear checkboxes - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Spear checkboxes</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <label> <input type="checkbox" /> <div class="control"> <div class="box"> <div class="shadow"></div> <div class="spear"></div> </div> </div> Sign-up
</label>
<label> <input type="checkbox" /> <div class="control"> <div class="box"> <div class="shadow"></div> <div class="spear"></div> </div> </div>
Subscribe
</label>
<label> <input type="checkbox" /> <div class="control"> <div class="box"> <div class="shadow"></div> <div class="spear"></div> </div> </div>
Opt-in for life
</label>
<label> <input type="checkbox" /> <div class="control"> <div class="box"> <div class="shadow"></div> <div class="spear"></div> </div> </div> Agree to be contacted by <em>them</em>
</label>
<label> <input type="checkbox" /> <div class="control"> <div class="box"> <div class="shadow"></div> <div class="spear"></div> </div> </div>
Be billed for looking at pictures of cats
</label> <script src="js/index.js"></script>
</body>
</html>

Spear checkboxes - Script Codes CSS Codes

* { box-sizing: border-box;
}
input[type=checkbox] { position: absolute; top: -9999px; left: -9999px;
}
label { display: block; position: relative; font-weight: bold; font-size: 28px; line-height: 1; left: 10px; color: #444333;
}
.control { position: relative; display: inline-block; margin-bottom: 10px;
}
.box { display: inline-block; position: relative; width: 50px; height: 50px; border-radius: 3px; border: 5px solid #cd5c5c; -webkit-transition: border 150ms linear; transition: border 150ms linear; -webkit-transition-delay: 0; transition-delay: 0; cursor: pointer; -webkit-perspective: 1000px; -ms-perspective: 1000px; perspective: 1000px; box-shadow: -2px 1px 10px 0 #d3d3d3;
}
.spear,
.shadow { position: absolute; height: 35px; width: 4px; top: -8px; left: 25px; background-color: #963; -webkit-transform-origin: bottom center; transform-origin: bottom center; -webkit-transform: translate3d(100px, -120px, 0) rotate(90deg); transform: translate3d(100px, -120px, 0) rotate(90deg); overflow: visible; -webkit-transition: all 150ms linear; transition: all 150ms linear; opacity: 0; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter: alpha(opacity=0);
}
.spear:after,
.shadow:after { position: absolute; border-left: 4px solid transparent; border-top: 10px solid #c0c0c0; border-right: 4px solid transparent; content: ''; left: -2px; bottom: -10px;
}
/*.spear:before position absolute content '' top -5px left -2px border-right pnt-w solid transparent border-top pnt-h solid red border-left pnt-w solid transparent*/
.shadow { left: 14px; top: -1px; height: 30px; background: -webkit-linear-gradient(top, transparent, #222); background: linear-gradient(to bottom, transparent, #222); -webkit-transform: translate3d(-100px, -100px, 0) rotate(-35deg); transform: translate3d(-100px, -100px, 0) rotate(-35deg);
}
.shadow:after { border-left: 4px solid transparent; border-top: 10px solid #222; border-right: 4px solid transparent;
}
.box.ticked { -webkit-transition-delay: 150ms; transition-delay: 150ms; border: 5px solid #4d6;
}
.box.ticked .spear { -webkit-transform: rotate(35deg); transform: rotate(35deg); opacity: 1; -ms-filter: none; -webkit-filter: none; filter: none;
}
.box.ticked .shadow { -webkit-transform: rotate(-45deg) scale(0.9); transform: rotate(-45deg) scale(0.9); opacity: 0.3; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=30)"; filter: alpha(opacity=30);
}

Spear checkboxes - Script Codes JS Codes

(function() { var box, boxes, i, len; boxes = document.querySelectorAll('.box'); for (i = 0, len = boxes.length; i < len; i++) { box = boxes[i]; box.addEventListener('click', function() { return this.classList.toggle('ticked'); }); }
}).call(this);
Spear checkboxes - Script Codes
Spear checkboxes - Script Codes
Home Page Home
Developer Ross B
Username rocbear
Uploaded November 24, 2022
Rating 3.5
Size 3,682 Kb
Views 18,216
Do you need developer help for Spear checkboxes?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Ross B (rocbear) Script Codes
Create amazing marketing copy with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!