-ms-user-select:IE11中没有错误

时间:2017-02-20 14:40:47

标签: html css internet-explorer-11

-ms-user-select:在IE11中没有错误。可以通过选择先出现在不可选择文本之前的文本然后继续标记来选择文本。 Se giffiddleimage

caniuse未报告此错误。

这是一个已知的错误吗?有没有办法只使用CSS解决这个问题,还是需要使用JavaScript?我使用的是版本11.0.9600.18537。

HTML:

<p>You can mark this</p>
<div>You can mark this in IE</div>

CSS:

div {
-webkit-touch-callout: none;
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none !important;
          user-select: none;
}

1 个答案:

答案 0 :(得分:0)

请参阅https://developer.mozilla.org/en-US/docs/Web/CSS/user-select以及 none 参数的规范:

  

将无法选择元素和子元素的文本。选择可以包含这些元素。

相关问题