Hướng dẫn custom-checkbox bootstrap 4
Bootstrap 4 Custom FormsBootstrap 4 comes with customized form elements, that are meant to replace browser defaults: Show Custom file upload Toggle this custom switch Custom CheckboxTo create a custom checkbox, wrap a container element, like , with a class of .custom-control and .custom-checkbox around the checkbox. Then add the .custom-control-input to the input with type="checkbox".
Tip: If you use labels for accompanying text, add the ExampleTry it Yourself » Custom SwitchTo create a custom "toggle switch", wrap a container element, like , with a class of .custom-control and .custom-switch around a checkbox. Then add the .custom-control-input class to the checkbox:Toggle me ExampleTry it Yourself » Custom Radio buttonsTo create a custom radio button, wrap a container element, like , with a class of
.custom-control and .custom-radio around the radio button. Then add the .custom-control-input to the input with type="radio".Tip: If you use labels for accompanying text, add the ExampleTry it Yourself » Inline Custom Form ControlsIf you want the custom form controls to sit side by side
(inline), add the Custom radio Custom radio ExampleTry it Yourself » Custom Select MenuTo create a custom select menu, add the ExampleTry it Yourself » Custom Select Menu SizeUse the ExampleTry it Yourself » Custom RangeTo create a custom range menu, add the Custom range Default range ExampleTry it Yourself » Custom File UploadTo create a custom file upload, wrap a container element with a class of Tip: If you use labels for accompanying text, add the Choose file Default file: Note that you also have to include some jQuery code if you want the name of the file to appear when you select a specific file: ExampleTry it Yourself » |