如何避免这与CSS?

这个问题在这里已经有了答案:

  • 如何禁用文本选择突出显示? 37个答案

  • 只需禁用用户选择。

    .glyphicon{
        -webkit-user-select: none;
           -moz-user-select: none;
            -ms-user-select: none;
                user-select: none;
    }
    

    将此添加到您的元素中,如此答案中所示:

    .ClassName,
    .ClassName:focus {
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        outline-style:none;/*IE*/
    }
    
    链接地址: http://www.djcxy.com/p/7133.html

    上一篇: How to avoid this with CSS?

    下一篇: How to stop the user from highlighting any text using javascript?