Create CSS to enlarge checkboxes

后端 未结 9 1007
萌比男神i
萌比男神i 2020-12-29 22:12

I am trying to double the size of my checkboxes on a few pages. How do I make that happen in CSS? I don\'t want to style the hover.

Ideas?

相关标签:
9条回答
  • 2020-12-29 22:47

    Or simply style it with height and width like this:

    <input style="height: 26px; width:26px; margin-left:-30px" value="" type="checkbox">
    

    PS. I have used this with bootstrap and the "checkbox-inline" class

    0 讨论(0)
  • 2020-12-29 22:49

    Styling checkboxes is risky business. It's one of those things that never seems to work consistently with all browsers.

    or you can try with

     style="zoom:1.2"
    

    jQuery offers a plugin to do a replacement on checkboxes

    0 讨论(0)
  • 2020-12-29 22:49

    I think the best you can do is give it a bigger font-size. From there it's up to how the browser handles it unless you make a mock div element that controls a hidden checkbox. It doesn't scale it up that much.

    input[type="checkbox"] {
      font-size: 50px;
    }
    
    0 讨论(0)
提交回复
热议问题