首页
学习
活动
专区
圈层
工具
发布
  • 您找到你想要的搜索结果了吗?
    是的
    没有找到

    JS魔法堂:阻止元素被选中

    一、前言                               在为IE5.5~9polyfill HTML5新特性placeholder时需要阻止元素被选中,因此在网上、书上查阅相关资料,记录在此以便日后查阅...二、IE10+实现方式──CSS3                     .unselect { -webkit-user-select: none; -moz-user-select...*/ -o-user-select: none; user-select: none; } user-select: auto; => 用户可以选中元素中的内容 user-select...: none; => 用户不可选中元素中的内容 user-select: text; => 用户可以选中元素中的文字 目前这个 user-select 兼容 Chrome 6+、Firefox、IE 10...   http://www.html-js.com/article/The-Laispace-block-element-is-selected-and-clear-the-check-method

    5.7K60
    领券