Why cannot change checkbox color whatever I do?

前端 未结 14 2233
孤城傲影
孤城傲影 2020-11-28 08:54

I try to style checkbox background color, but it won\'t change whatever I do. I am using firefox 29 latest.

Is there some rule changes in css or may be in the browse

14条回答
  •  温柔的废话
    2020-11-28 09:08

    I had the same issue, trying to use large inputs and had a very small checkbox. After some searching, this is good enough for my needs:

    input[type='checkbox']{
      width: 30px !important;
      height: 30px !important;
      margin: 5px;
      -webkit-appearance: none;
      -moz-appearance: none;
      -o-appearance: none;
      appearance:none;
      outline: 2px solid lightblue;
      box-shadow: none;
      font-size: 2em;
    }
    

    JSFiddle

    Maybe someone will find it useful.

提交回复
热议问题