在页面的head里面填写如下内容:
<style>
<!--
* {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
-->
</style>
本文介绍了一种通过CSS来全局禁用网页上所有元素的文字选中与拖拽调用功能的方法,适用于需要防止用户误操作或保护页面内容不被轻易复制的场景。
在页面的head里面填写如下内容:
<style>
<!--
* {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
-->
</style>
633

被折叠的 条评论
为什么被折叠?