CSS ::selection Pseudo-element
- ਪਿੰਡਾ ਪੰਨਾ ::placeholder
- ਅਗਲਾ ਪੰਨਾ ::spelling-error
- ਉੱਪਰ ਵਾਲੀ ਪੱਧਰ سی ایس ایس ڈرائیور مراجع منول
Definition and Usage
CSS ::selection
Pseudo-elements are used to set the style of the selected text portion.
Note:The following properties can be used with ::selection
Used Together:
- color
- background-color
- text-decoration
- text-shadow
Example
Set the text color to red and the background to yellow for the selected text:
::selection { color: red; background: yellow; }
CSS Syntax
::selection { css declarations; }
Technical Details
Version: | CSS3 |
---|
Browser Support
The numbers in the table specify the first browser version that fully supports this pseudo-element.
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
4 | 12 | 62 | 1.1 | 9.5 |
- ਪਿੰਡਾ ਪੰਨਾ ::placeholder
- ਅਗਲਾ ਪੰਨਾ ::spelling-error
- ਉੱਪਰ ਵਾਲੀ ਪੱਧਰ سی ایس ایس ڈرائیور مراجع منول