Border radius on Focus input field

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

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

HTML


CSS

.r         


        
4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-13 17:56

    The other answers have covered the solution, however, the supplied CSS styles do not accurately reproduce the blue ring color or size. For example, replacing:

    :focus {
        outline: -webkit-focus-ring-color auto 5px;
    }
    

    With the solutions provided, results in a purple-tinted blue before and after pic. Instead, try this color:

    .rest:focus {
      outline: none; 
      border-radius: 8px;  /* Your border radius here */
      box-shadow: 0px 0px 1px rgba(0,100,255,1),
                  0px 0px 2px rgba(0,100,255,1),
                  0px 0px 3px rgba(0,100,255,1); /* #0064FF */
    }
    

提交回复
热议问题