How do I make a checkbox rounded with custom CSS? Something similar to the image below. I know there are frameworks like bootstrap provides this, but I don't want to use a framework for this sole purpose as I'm already using angular material.
HTML Code:
<label class="checkbox-inline">
<input type="checkbox" name="favoriteColors" ng-model="notification.checked">
</label>
Thanks in Advance.
use
}
https://jsfiddle.net/lucashuang/ew4gc1aL/24/
https://i.stack.imgur.com/dtiYB.png
You directly use the css from here http://flatlogic.github.io/awesome-bootstrap-checkbox/demo/ .. Just include
.checkbox-circle
class in your code and use.use radio buttons. if you want multiple selection, you can set the same name for all the radio buttons and use different id's.
You can use pseudoclasses for the label, and visually hide the actual checkbox.
Hope This Help You... :-)
If you're sure you want check boxes and not radio buttons
Check boxes are generally square and several can be checked, radio buttons are circular but only one out of a group can be selected
I've written a little bit of CSS based off this (checkboxfour) but I've changed it slightly to make it fit with what you've asked for.
Also I've shown that you can use different colours by changing the class and of course adding the colour to the CSS, the last 3 sections of CSS are all about the colours. The middle one is the orange from the picture you shared.
If you follow the tutorial I've linked you'll get a good idea of what I've done and why.
I think it might be worth reading this which covers all of the input types (feel free to ignore if you know about them already)
I hope this helps.