如何使用css2/js/html使div容器不可选择
我尝试了如何使用css2/js/html使div容器不可选择,html,css,Html,Css,我尝试了::selection,-moz,-webkit,-o,node.setAttribute(“unselectable”,“on”)一些东西,但没有任何效果。有人对此有什么想法吗?您可以尝试使用用户选择:无带前缀: 测试页面: element { -webkit-user-select: none; /* Chrome all / Safari all */ -moz-user-select: none; /* Firefox all */ -ms-user-se
::selection,-moz,-webkit,-o,node.setAttribute(“unselectable”,“on”)
一些东西,但没有任何效果。有人对此有什么想法吗?您可以尝试使用用户选择:无代码>带前缀:
测试页面:
element {
-webkit-user-select: none; /* Chrome all / Safari all */
-moz-user-select: none; /* Firefox all */
-ms-user-select: none; /* IE 10+ */
-o-user-select: none; /* Opera */
user-select: none; /* regular */
}