Border radius on Focus input field

前端 未结 4 2233
盖世英雄少女心
盖世英雄少女心 2021-02-13 17:19

how can we adjust the border radius of the input field focus.

HTML


CSS

.r         


        
4条回答
  •  北荒
    北荒 (楼主)
    2021-02-13 18:04

    You have to disable the outline of the element focus state:

    *:focus { /*OR .rest:focus*/
        outline:none;
    }
    

    Here is a FIDDLE

    If you want the border-radius on the browser default focus outline you can do it only on firefox with -moz-outline-border:5px; , but this will only work on FF, however the request to implement a similar feature in WebKit was closed as WONTFIX, The plan for the future is to make the outlines follow the borders.

提交回复
热议问题