CSS禁止区域内的文字双击被选中

把下列样式添加到div中,则div中的所有子元素,则不会被选中.

参考: https://www.cnblogs.com/wyhlightstar/p/6542295.html

.div{
    -moz-user-select:none;/*火狐*/
    -webkit-user-select:none;/*webkit浏览器*/
    -ms-user-select:none;/*IE10*/
    -khtml-user-select:none;/*早期浏览器*/
      user-select:none;
}

猜你喜欢

转载自www.cnblogs.com/Oldz/p/12627369.html