Remove text caret/pointer from focused readonly input

后端 未结 7 1936
醉梦人生
醉梦人生 2020-12-13 06:26

I am using an , styled as normal text to remove the appearance of an interactive field, but still display the value.

7条回答
  •  执笔经年
    2020-12-13 06:46

    You can use this in your css, but it will not focus:

    [readonly='readonly'] {
       pointer-events: none;
    }
    

提交回复
热议问题