What is -webkit-focus-ring-color?

后端 未结 6 1479
我寻月下人不归
我寻月下人不归 2020-12-08 13:36

I want to reproduce the outline effect for focused input boxes in webkit to non-webkit browsers. I found here the default CSS used in webkit. The lines of inter

6条回答
  •  执笔经年
    2020-12-08 13:49

    The following code tries to find the closest solution to the system colors:

    *:focus {
        box-shadow: 0 0 1px 3px rgba(59, 153, 252, .7);
        box-shadow: 0 0 0 3px activeborder; /* Blink, Chrome */ 
        box-shadow: 0 0 0 3px -moz-mac-focusring; /* Firefox */
        outline: auto 0 -webkit-focus-ring-color; /* Webkit, Safari */
    }
    

提交回复
热议问题