How to prevent text from being selected by css
This article "css how to achieve the prohibition of text selection" article, the article example code is introduced in great detail, with a certain reference value, interested friends must refer to, for "css how to achieve the prohibition of text selection", Xiaobian sorted out the following knowledge points, please follow the pace of the editor step by step slowly understand, then let us enter the topic.
Css forbidden text is selected .m-no-select {- webkit-touch-callout:none; / * iOSSafari*/-webkit-user-select:none; / * Chrome/Safari/Opera*/-khtml-user-select:none; / * Konqueror*/-moz-user-select:none; / * Firefox*/-ms-user-select:none / * InternetExplorer/Edge*/ user-select:none; / * Non-prefixedversion,currently notsupportedbyanybrowser*/} you can choose three ways to introduce css that are not allowed. Inline style, the most straightforward and simplest, uses style= "" directly for HTML tags. two。 The embedded style is to write the CSS code in between and use the
To make a statement. 3. External style, in which the link style is the most frequently used and the most practical style, only need to add
Just do it. The second is to import styles, import styles and link styles are similar, using @ import style to import CSS stylesheets, not recommended. The above is all the contents of the article "how to prevent text from being selected by css". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!