jquery - 更改 Bootstrap 表单元格中复选框的大小

标签 jquery css twitter-bootstrap twitter-bootstrap-3 bootstrap-table

我使用 bootstrap-table和一个 column with checkboxes .如何更改复选框的大小。在我的 code我想要 25x25 大小的复选框,但是当我使用高度和宽度 css 属性时它不起作用。

html

<table class="table table-striped table-bordered table-hover"  cellspacing="0" id="mainTable" data-click-to-select="true" data-show-toggle="true" data-show-columns="true" data-search="true" data-pagination="true">
    <thead>
    <tr>
        <th data-field="state" data-checkbox="true" data-formatter="starsFormatter"></th>
        <th data-field="name" data-halign="center" data-align="left" data-sortable="true">Name</th>
        <th data-field="stargazers_count" data-formatter="starsFormatter" data-halign="center" data-align="left" data-sortable="true">Stars</th>
        <th data-field="forks_count" data-formatter="forksFormatter" data-halign="center" data-align="left" data-sortable="true">Forks</th>
        <th data-field="description" data-halign="center" data-align="left" data-sortable="true">Description</th>
    </tr>
    </thead>
</table>

javascript

var data = [{name: 'ala', stargazers_count: 234, forks_count: 234, description: "asdasdas"},
           {name: 'ala', stargazers_count: 234, forks_count: 234, description: "asdasdas"},
           {name: 'ala', stargazers_count: 234, forks_count: 234, description: "asdasdas"}]

$('table').bootstrapTable({
    data: data
});

function starsFormatter(row, value, inde) {
    return row + '<i class="glyphicon glyphicon-star"></i> ';
}

function forksFormatter(value) {
    return '<i class="glyphicon glyphicon-cutlery"></i> ' + value;
}

CSS

.bs-checkbox input{
    height: 25px;
    width: 25px;
}

最佳答案

简单易行的方法

input[type="checkbox"]{
transform:scale(x,y);
}

x,y can be any value depends upon how much large box you want

关于jquery - 更改 Bootstrap 表单元格中复选框的大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32467051/

相关文章:

javascript - jQuery 滑动选项卡 : control options- NEXT/PREVIOUS

html - CSS WebFont 渲染问题 - 1 像素不同的颜色

javascript - 表单提交后模态仍然出现

javascript - 文件不被缓存

javascript - 单击另一个字段时,Firefox 表单字段窃取焦点

css - 我的带有 repeat-x 属性的背景图片被截掉了

html - Bootstrap 下拉功能不起作用

javascript - 同一页面中存在多个时间选择器的错误

javascript - 修改 Bootstrap Collapse : make content appear to the right of tabs

javascript - 数字文本框 - 格式设置