Accessible custom CSS only Radio buttons
How do I make an accessible custom css only radio buttons?
Attempt at accessible custom Radio button with CSS only. WIP, needs to look sexier. . What is a accessible custom css only radio buttons? How do you make a accessible custom css only radio buttons? This script and codes were developed by Chris Yaxley on 07 January 2023, Saturday.
Accessible custom CSS only Radio buttons - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Accessible custom CSS only Radio buttons</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="example-wrapper"> <h1>Accessible custom CSS only Radio buttons</h1> <h2>WIP, I will make this look better :)</h2> <p>Buliding apon Angelata's excellent custon Radio buttons I made a few small changed so the default radio button sits behind the custom style so is accessible / tabbible.<p/> <p>You can see the original (much sexier example here: <a href="https://codepen.io/Angelata/pen/Eypnq">https://codepen.io/Angelata/pen/Eypnq</a></p> <div class="custom-radios"> <input class="radiobox" id="PhotographyPermisionFalse" name="PhotographyPermission" type="radio" value="False"> <label class="text" for="PhotographyPermisionFalse" tabindex="0">No</label> <div class="check"><div class="inside"></div></div> </div> <div class="custom-radios"> <input class="radiobox" id="PhotographyPermission" name="PhotographyPermission" type="radio" value="True"> <label class="text" for="PhotographyPermission">Yes</label> <div class="check"><div class="inside"></div></div> </div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
</body>
</html>
Accessible custom CSS only Radio buttons - Script Codes CSS Codes
.custom-radios { position: relative; height: 2em;
}
.custom-radios input[type=radio] { display: inline-block; height: 1.188em; width: 1.188em;
}
.custom-radios input[type=radio]:focus { border-radius: 100%; box-shadow: 0 0 0.875em 0.188em #FA00F3;
}
.lt-ie9 .custom-radios input[type=radio] { display: inline;
}
.custom-radios label { cursor: pointer; color: #ffffff; display: inline-block; position: relative; z-index: 9; left: -2.063em; padding: 0 0 0 2.5em; height: 2em;
}
.custom-radios .check { position: absolute; top: -2px; left: -3px; display: block; width: .750em; height: .750em; border: .375em solid #ffffff; border-radius: 100%;
}
.lt-ie9 .custom-radios .check { display: none;
}
.custom-radios input[type=radio]:checked ~ .check .inside { position: relative; top: 0; display: block; width: 100%; height: 100%; margin: auto; border-radius: 100%; background: #FA00F3;
}
/*Just page styling from hewre on down*/
html { background-color: #262626; color: #ffffff; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
a { color: #FA00F3;
}
Developer | Chris Yaxley |
Username | chrisyaxley |
Uploaded | January 07, 2023 |
Rating | 3 |
Size | 2,836 Kb |
Views | 8,096 |
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 |
Some modern CSS techniques | 5,991 Kb |
Quick PostCodes.io test | 2,195 Kb |
Responsive Calender view | 4,093 Kb |
Basic Mario Keyframes animation | 3,258 Kb |
No-JS Tool tips | 2,634 Kb |
No-JS Off Canvas Navigation | 4,805 Kb |
3D Transforms CSS Carousel | 2,353 Kb |
Google style image preview | 1,947 Kb |
A Pen by Chris Yaxley | 1,497 Kb |
Social Share Sprite using SASS Each | 2,607 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 |
Table border-collapse property | Maxds | 1,672 Kb |
Fullscreen Parallax | Bassta | 3,313 Kb |
NeeilTimer | Neeilan | 2,836 Kb |
SVG Circle Progress | JMChristensen | 3,368 Kb |
Single element checkbox | Ivijaygupta | 1,996 Kb |
A Pen by Andrea Verlicchi | Verlok | 2,018 Kb |
RAQuote | Naderk007 | 4,412 Kb |
Mobile Sub Menu Concept | Berdejitendra | 2,790 Kb |
Flat UI - Checkbox FIX | ARS | 2,663 Kb |
Prism | Pyrografix | 2,843 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!