How can I make a checkbox bigger?

后端 未结 6 1473
野趣味
野趣味 2021-01-04 20:26

My web page uses checkboxes. They appear very small. I tried to make them bigger by using \"font-size: 1.5em\". This didn\'t seem to change them at all.

Is there a

6条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-04 21:08

    You can do this using images.

    CSS

    #mycheckbox
    { 
        display: none; 
    }
    
    #mycheckbox + label
    { 
        float: left; 
        width: 200px; 
        height: 200px; 
        background: url('/path/to/photo_of_big_unchecked_box.png'); 
    }
    
    #mycheckbox:checked + label
    { 
        background: url('/path/to/photo_of_big_checked_box.png'); 
    }
    

    HTML

    
    

    That's one way you might accomplish the goal.

    EDIT

    Here is the working link for IE

提交回复
热议问题