Home > Web Front-end > CSS Tutorial > CSS prohibits selected text

CSS prohibits selected text

王林
Release: 2020-05-08 09:10:29
forward
2289 people have browsed it

CSS prohibits selected text

css code:

.box {    
/* 禁止选中文本 */
    -moz-user-select: none; /*火狐*/
    -webkit-user-select: none; /*webkit浏览器*/
    -ms-user-select: none; /*IE10*/
    -khtml-user-select: none; /*早期浏览器*/
    -webkit-touch-callout: none;    user-select: none;
}
Copy after login

(Video tutorial recommendation: css video tutorial)

Disable right mouse button

<body oncontextmenu="return false;" onselectstart="return false"></body>
Copy after login

Recommended tutorial: css quick start

The above is the detailed content of CSS prohibits selected text. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:cnblogs.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template