Wednesday, 27 July 2016

CSS3 user-select properties

Controls the actual Selection operation. This doesn't have any effect on content loaded as chrome, except in textboxes. A similar property user-focus was proposed in early drafts of a predecessor of css3-ui but was rejected by the working group.


user-select: none;

The text of the element and sub-elements will not be able to be selected. Selection can contain these elements. Starting with Firefox 21 none behaves like -moz-none, so selection can be re-enabled on sub-elements using -moz-user-select:text.

user-select: auto;

The text will be selected according to the browser's default properties.

user-select: text;

The text can be selected by the user.

user-select: all;


In an HTML editor, if a double-click or context-click occurred in sub-elements, the highest ancestor with this value will be selected.

user-select: contain;element (IE-specific alias)

Enables selection to start within the element; however, the selection will be contained by the bounds of that element. Supported only in Internet Explorer.
 

No comments:

Post a Comment