Getting rid of default red border for required fields

前端 未结 1 2183
被撕碎了的回忆
被撕碎了的回忆 2021-02-19 18:38

I have some required fields in the form. For required fields I want 1px red border for highlighting form fields after form submit. Chrome is doing that perfectly. IE is giving t

1条回答
  •  日久生厌
    2021-02-19 19:14

    This ugly appearance in IE is caused by the outline property. You can remove it with this:

    input:required:invalid {
        outline: none;
    }
    

    0 讨论(0)
提交回复
热议问题