Checkboxes in web pages – how to make them bigger?

前端 未结 7 1148
南笙
南笙 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:34

    In case this can help anyone, here's simple CSS as a jumping off point. Turns it into a basic rounded square big enough for thumbs with a toggled background color.

    input[type='checkbox'] {
        -webkit-appearance:none;
        width:30px;
        height:30px;
        background:white;
        border-radius:5px;
        border:2px solid #555;
    }
    input[type='checkbox']:checked {
        background: #abd;
    }

提交回复
热议问题