Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php $checkboxTemplate = '<div class="form-group">{hint}{input}{beginLabel}{labelTitle}{endLabel}{error}</div>'; ?>
- <?= $form->field($model, 'namePPP')->checkbox(['template' => $checkboxTemplate])->label('label'); ?>
- <style>
- [type="checkbox"] + label, [type="radio"] + label {
- cursor: pointer;
- line-height: 25px;
- font-size: 1rem;
- }
- [type="checkbox"], [type="radio"] {
- position: absolute;
- left: -9999px;
- visibility: hidden;
- }
- [type="checkbox"] + label, [type="radio"] + label {
- position: relative;
- padding-left: 30px;
- cursor: pointer;
- display: inline-block;
- height: 25px;
- line-height: 25px;
- font-size: 1rem;
- }
- [type="checkbox"] + label, [type="radio"] + label {
- position: relative;
- padding-left: 30px;
- cursor: pointer;
- display: inline-block;
- height: 25px;
- line-height: 25px;
- font-size: 1rem;
- }
- [type="checkbox"]:checked + label::before {
- top: -4px;
- left: -3px;
- width: 12px;
- height: 22px;
- border-style: solid;
- border-width: 2px;
- border-color: transparent #299e0c #4285f4 transparent;
- -webkit-transform: rotate(40deg);
- -ms-transform: rotate(40deg);
- transform: rotate(40deg);
- -webkit-transform-origin: 100% 100%;
- -ms-transform-origin: 100% 100%;
- transform-origin: 100% 100%;
- }
- [type="checkbox"] + label::before {
- content: "";
- position: absolute;
- top: 0;
- left: 0;
- width: 17px;
- height: 17px;
- z-index: 0;
- border: 1.5px solid #8a8a8a;
- border-top-width: 1.5px;
- border-right-width: 1.5px;
- border-bottom-width: 1.5px;
- border-left-width: 1.5px;
- border-top-style: solid;
- border-right-style: solid;
- border-bottom-style: solid;
- border-left-style: solid;
- border-top-color: rgb(138, 138, 138);
- border-right-color: rgb(138, 138, 138);
- border-bottom-color: rgb(138, 138, 138);
- border-left-color: rgb(138, 138, 138);
- -webkit-border-radius: 1px;
- border-radius: 1px;
- margin-top: 2px;
- -webkit-transition: .2s;
- -o-transition: .2s;
- transition: .2s;
- }
- </style>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement