How can I prevent text/element selection with cursor drag

后端 未结 8 1067
刺人心
刺人心 2020-12-02 08:12

I made a paging control and I noticed that while clicking on the buttons it is very easy to accidentally select the individual images and text. Is it possible to prevent thi

8条回答
  •  余生分开走
    2020-12-02 08:16

    This is a very old post. It may not answer exactly that situation, but i use CSS for my solution:

    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    

提交回复
热议问题