Pure css prohibits users from copying text and saving pictures, and uses css to hide the mobile terminal scroll bar

1. Pure css prohibits users from copying text and saving pictures

body{
    
    
    -moz-user-select:none;/*火狐*/
    -webkit-user-select:none;/*webkit浏览器*/
    -ms-user-select:none;/*IE10*/
    -khtml-user-select:none;/*早期浏览器*/
    user-select:none;
}

-webkit-touch-callout is mainly used to disable long press menu. Of course, for browsers with a webkit kernel.

The user-select attribute is a new attribute of CSS3, which is used to set whether the user can select text.

2. The method of using css to hide the mobile scroll bar

//  滚动盒子
.wrapper {
    
    
    height: calc(100% - 68px);
    overflow: hidden;
    overflow-y: scroll;

    .wrapper-box {
    
    
        -webkit-overflow-scrolling: touch;
    }

    &::-webkit-scrollbar {
    
    
        display: none;
    }
}

Guess you like

Origin blog.csdn.net/qq_42386231/article/details/125432216