Copy Chrome default input's outline style

后端 未结 6 1008
心在旅途
心在旅途 2021-01-07 17:18

How can I set the default Chrome input\'s outline style (on focus, the orange one), so it looks the same in every browser? Chrome style seems to be textarea:focus{outl

6条回答
  •  暖寄归人
    2021-01-07 17:35

    default Chrome outline-style:

    outline-color: rgb(77, 144, 254); // #4D90FE
    outline-offset: -2px;
    outline-style: auto;
    outline-width: 5px;
    

    convert to this

     input:focus {
         outline:none; 
         border:1px solid #4D90FE;
         -webkit-box-shadow: 0px 0px 5px  #4D90FE;
         box-shadow: 0px 0px 5px  #4D90FE;
     }
    

提交回复
热议问题