【问题标题】:How to increase the size of checkbox mean height and width?如何增加复选框平均高度和宽度的大小?
【发布时间】:2013-10-09 15:28:21
【问题描述】:

你能告诉我如何增加复选框的平均高度和宽度。

我是这样用的,但是尺寸还是没有增加相同的尺寸..

<input name="" type="checkbox" value="" class="big">

 input.big {
        height: 15em;
        width: 15em;
    }

【问题讨论】:

  • 我认为这是这里提出的许多类似问题的重复。我建议你浏览一下stackoverflow,你会得到答案。
  • 你能举个小提琴的例子吗

标签: jquery css


【解决方案1】:

这样做:

input[type=checkbox]
    {
        /* Double-sized Checkboxes */
        -ms-transform: scale(2); /* IE */
        -moz-transform: scale(2); /* FF */
        -webkit-transform: scale(2); /* Safari and Chrome */
        -o-transform: scale(2); /* Opera */
        padding: 10px;
    }
    input.big {           
        font-size: 110%;
        display: inline;
    }

【讨论】:

  • 对我来说工作正常。请查看此屏幕截图:d.pr/i/FRuF 可能是您缺少顶部的 doctype 标签:
  • 点击有问题。如果你选择它的操作系统显示黑色复选框
【解决方案2】:

由于这些复选框不可自定义。您必须使用一些外部方法

我认为这可能对你有帮助 customizable checkbox and radio button

<p>
    <input type="radio" value="male" id="male" name="gender" />
    <label for="male">Male</label>
</p>

css:

p:not(#foo) > input + label {
    background: url(gr_custom-inputs.png) 0 -1px no-repeat;
    height: 16px;
    padding: 0 0 0 18px;
}

Demo

【讨论】:

  • 你能举一个小提琴的例子吗
  • @user2075328 添加了 jsfiddle
猜你喜欢
  • 2016-01-14
  • 1970-01-01
  • 2019-08-31
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-06-07
  • 2016-07-12
相关资源
最近更新 更多