Spear checkboxes
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 - 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);
Developer | Ross B |
Username | rocbear |
Uploaded | November 24, 2022 |
Rating | 3.5 |
Size | 3,682 Kb |
Views | 18,216 |
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!
Name | Size |
Torus light track | 4,909 Kb |
Babel React template | 5,357 Kb |
Unfolding circular menu | 7,466 Kb |
Playful inner-page navigation | 4,689 Kb |
Liquid gold | 6,470 Kb |
Hovergram | 2,505 Kb |
Canvas blend modes | 4,640 Kb |
Spin button | 3,935 Kb |
A Pen by Ross B | 3,715 Kb |
Full page scroll-over with ScrollMagic | 2,752 Kb |
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!
Name | Username | Size |
Ball bouncing loading animation | Adam2326 | 3,144 Kb |
LBCA - Mail canvas | Emnbdx | 3,856 Kb |
Process Accordion | Devilskitchen | 31,432 Kb |
Perspective Origin Demo | Agelber | 3,614 Kb |
Basic template | Tomcat | 1,675 Kb |
Blog | Rottingroom | 1,430 Kb |
Pure CSS Spinners | Jlong | 2,043 Kb |
Pure CSS read more toggle | Idered | 2,344 Kb |
Jochaho Skeleton | Dhanushbadge | 1,689 Kb |
Hovers with popups | Zacharyolson | 2,380 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!