zoukankan      html  css  js  c++  java
  • css 禁止选中文本

    css 如何禁止选中文字

    .noselect {
        -webkit-touch-callout: none; /* iOS Safari */
        -webkit-user-select: none; /* Chrome/Safari/Opera */
        -khtml-user-select: none; /* Konqueror */
        -moz-user-select: none; /* Firefox */
        -ms-user-select: none; /* Internet Explorer/Edge */
        user-select: none; /* Non-prefixed version, currentlynot supported by any browser */
    }

    在 IE < 10 和Opera < 15中我们需要在需要禁止选中的元素上面添加一个属性

    unselectable="on",否则可能不会生效,不过现代浏览器如果不是非得兼容一些老的浏览器也可以不加。

    文章来源: http://www.divcss5.com/rumen/r17062.shtml

  • 相关阅读:
    css之盒子模型
    meta小结
    css小结
    html标签及用法小结
    Css基础(2)
    Css基础(1)
    Html基础(2)
    Html基础(1)
    Markdown基础
    演示二
  • 原文地址:https://www.cnblogs.com/ooo0/p/7728240.html
Copyright © 2011-2022 走看看