好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

CSS如何实现文本禁止被选中

代码如下:

 div{ 
  text-align:center; 
  vertical-align:middle; 
  height:39px; 
  overflow:hidden; 
  moz-user-select:-moz-none; 
  -moz-user-select:none; 
  -o-user-select:none; 
  -khtml-user-select:none; 
  -webkit-user-select:none;
  -ms-user-select:none; 
  user-select:none;
}  

以上代码可以实现禁止div中的文本被选中。
但是美中不足的是,IE10以下浏览器并不支持此效果。

查看更多关于CSS如何实现文本禁止被选中的详细内容...

  阅读:35次