In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces how to set the css text is not selectable, the article is very detailed, has a certain reference value, interested friends must read it!
Css text unselectable setting method: 1, create a HTML sample file; 2, create div and define the text content; 3, by setting the "user-select: none;" property to set the text unselectable.
This article operating environment: windows7 system, HTML5&&CSS3 version, Dell G3 computer.
How to make css text unselectable?
Css setting text is not optional example:
Creating non-selectable text using CSSdiv {margin-bottom: 20pxbot padding: 10pxbot background: rgba (10%, 10%, 10%, 0.3);-moz-border-radius: 15pxbot borderhouse radius: 15px;} div#d2 {- moz-user-select: none;-khtml-user-select: none;user-select: none;font-style: italic;} text can be selected. Text is not selectable.
Effect picture:
The css setting text is not optional using the user-select property.
Introduction to the user-select attribute:
The user-select attribute specifies whether the text of the element can be selected.
In a web browser, if you double-click on the text, the text is selected or highlighted. This property is used to prevent this behavior.
CSS syntax
User-select: auto | none | text | all
Attribute value
Value
Auto defaults. If the browser allows it, you can select the text.
None prevents text selection.
Text text can be selected by the user.
All Click to select text instead of double-click.
The above is all the contents of the article "how to make css text unselectable". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.