Checkboxes in web pages – how to make them bigger?

前端 未结 7 1132
南笙
南笙 2021-01-30 01:57

The standard checkboxes rendered in most browsers are quite small and don’t increase in size even when a larger font is used. What is the best, browser-independent way to displ

7条回答
  •  后悔当初
    2021-01-30 02:47

    Actually there is a way to make them bigger, checkboxes just like anything else (even an iframe like a facebook button).

    Wrap them in a "zoomed" element:

    .double {
      zoom: 2;
      transform: scale(2);
      -ms-transform: scale(2);
      -webkit-transform: scale(2);
      -o-transform: scale(2);
      -moz-transform: scale(2);
      transform-origin: 0 0;
      -ms-transform-origin: 0 0;
      -webkit-transform-origin: 0 0;
      -o-transform-origin: 0 0;
      -moz-transform-origin: 0 0;
    }

    It might look a little bit "rescaled" but it works.

    Of course you can make that div float:left and put your label besides it, float:left too.

提交回复
热议问题