Use the User-select property in CSS to control what the user selects on the page

Source: Internet
Author: User

The User-select property in CSS is used to prevent users from using the mouse to select text, images, etc. on the page, that is, make the page content is not selectable. You can also only allow users to select text, or all of them, users can select the text, but also include the text of the picture, video and other things. The User-select property is an element-level function that can affect not only the entire page, but also the specified element and its child elements.

"User-select" property in the major browsers are still experimental properties, may be discarded later, it is possible to regularization, the current use of a variety of browser engine prefix, it can play a good role.

user-Select: None;user-Select: Auto;user-Select: Text;user-Select: Contain;user-Select: All;//Firefox Browser-moz-user-Select: none;-moz-user-Select: text;-moz-user-Select: All;//Google Chrome-webkit-user-Select: none;-webkit-user-Select: text;-webkit-user-Select: All;//IE-ms-user-Select: none;-ms-user-Select: text;-ms-user-Select: All;-ms-user-Select: element;

None: Disable User Selection

Text: There is no limit to the user's choice

All: The target element will be selected as a whole, that is, you cannot select only one part of the text, and the browser automatically selects the contents of the entire element when you select it with the mouse. (Google browser doesn't seem too good?) )

Use the User-select property in CSS to control what the user selects on the page

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.