如果网站不需要阻止用户的选择内容的行为就可以使用如下样式:

* {
-webkit-user-select: text;
-user-select: text;
}
另一种方式:

*: not(input, textarea) {
-webkit - touch - callout: none;
-webkit - user - select: none;
}
最终的代码:
[contenteditable = "true"], input, textarea {
-webkit-user- select: auto!important;
-khtml-user-select: auto!important;
-moz-user-select: auto!important;
-ms-user-select: auto!important;
-o-user-select: auto!important;
user-select: auto!important;
}


https://www.cnblogs.com/mrnut/p/7656019.html

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-05-26
  • 2022-12-23
  • 2021-12-27
  • 2022-12-23
相关资源
相似解决方案