How to remove the border highlight on an input text element

前端 未结 18 1218
庸人自扰
庸人自扰 2020-11-22 05:49

When an HTML element is \'focused\' (currently selected/tabbed into), many browsers (at least Safari and Chrome) will put a blue border around it.

For the layout I a

18条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-22 06:35

    The only solutiion that worked with me

    The border is actually a shadow. So to hide it I had to do this:

    input[type="text"]:focus{
         box-shadow: 0 0 0 rgb(255, 255, 255);
    }
    
     input[type="checkbox"]:focus{
          box-shadow: 0 0 0 rgb(255, 255, 255);
     }
    

提交回复
热议问题