增加引导程序复选框的大小 [英] Increasing the size of a bootstrap checkbox

查看:39
本文介绍了增加引导程序复选框的大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用官方引导程序文档中的代码创建一个简单的复选框:

I am creating a simple check box with the code from the official bootstrap documentation:

<div class="custom-control custom-checkbox">
    <input type="checkbox" class="custom-control-input" id="customCheck" name="example1">
    <label class="custom-control-label" for="customCheck">Check this custom checkbox</label>
</div>

我想知道如何使该复选框大于当前的复选框?我尝试编辑 customCheck 的css并更改height和width属性,但这不会增加框的大小.

I am wondering how to make the checkbox larger than it currently is? I have tried editing the css of customCheck and changing the height and width properties, but that does not increase the size of the box.

推荐答案

更改引导程序组件的尺寸不是一个好主意,您应该更改引导程序中的变量,但这意味着重新编译库.无论如何,您都可以通过这种方式完成:

It is not a good idea to change bootstrap components dimensions, you should change variables in bootstrap but it means to recompile library. Anyway what you want can be done i this way:

.custom-control-label::before ,.custom-control-label::after{width:20px; height:20px}

这篇关于增加引导程序复选框的大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆