Home >Web Front-end >CSS Tutorial >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; }
(Video tutorial recommendation: css video tutorial)
Disable right mouse button
<body oncontextmenu="return false;" onselectstart="return false"></body>
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!