How to remove the border highlight on an input text element

前端 未结 18 1009
庸人自扰
庸人自扰 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:39

    Remove the outline when focus is on element, using below CSS property:

    input:focus {
        outline: 0;
    }
    

    This CSS property removes the outline for all input fields on focus or use pseudo class to remove outline of element using below CSS property.

    .className input:focus {
        outline: 0;
    } 
    

    This property removes the outline for selected element.

提交回复
热议问题