What is the css font non-copyable code?

藏色散人
Release: 2023-01-28 14:16:59
Original
2033 people have browsed it

The css font cannot be copied code is "-moz-user-select:none; -webkit-user-select:none; -ms-user-select:none; -khtml-user-select:none; - o-user-select:none;user-select:none;", where the "user-select" attribute specifies whether the text of the element can be selected.

What is the css font non-copyable code?

The operating environment of this tutorial: Windows 10 system, css3 version, DELL G3 computer

What is the non-copyable code for css fonts?

Using CSS to set the web page text to be read-only and non-copyable

The method to set the web page text to be non-copyable, in addition to the JS implementation we know In addition, it can also be implemented using css.

In CSS, you can set the "user-select:none;" style to the body element to set the text to be non-copiable and only readable.

css setting does not allow copying text content. The method is very simple. You can achieve the goal by setting the user-select of CSS:

-moz-user-select:none; /* Firefox私有属性 */
-webkit-user-select:none; /* WebKit内核私有属性 */
-ms-user-select:none; /* IE私有属性(IE10及以后) */
-khtml-user-select:none; /* KHTML内核私有属性 */
-o-user-select:none; /* Opera私有属性 */
user-select:none; /* CSS3属性 */
user-select属性设置或检索是否允许用户选中文本。
user-select的默认值是 text:可以选择文本
none:文本不被选择
Copy after login

Related introduction:

user-select attribute Specifies whether the element's text can be selected.

In a web browser, if you double-click on text, the text will be selected or highlighted. This property is used to prevent this behavior.

CSS Grammar

user-select: auto|none|text|all;
Copy after login

Attribute value:

What is the css font non-copyable code?

Recommended learning: "css video tutorial"

The above is the detailed content of What is the css font non-copyable code?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
css
source:php.cn
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