How to avoid this with CSS?

This question already has an answer here:

  • How to disable text selection highlighting? 37 answers

  • 只需禁用用户选择。

    .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/7134.html

    上一篇: 如何将<div>与页面的中间(水平/宽度)对齐

    下一篇: 如何避免这与CSS?