css设置文字不能被选中


  • 给想要设置文字不可选中区域外层添加class:select,并为该class设置样式如下:
.select{

    -webkit-user-select:none;

     -moz-user-select:none;

     -ms-user-select:none;

     user-select:none;

}

猜你喜欢

转载自blog.csdn.net/flyxiaokang/article/details/81199664
今日推荐