Skip to content
View in the app

A better way to browse. Learn more.

OKCCN - XenForo & IPS Plugin Marketplace

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
  • Language

CSS Pseudo-elements Reference

Featured Replies

  • Administrators

CSS Pseudo-elements Reference


CSS Pseudo-elements

A CSS pseudo-element is used to style specific parts of an element.

For example, it can be used to:

  • Style the first letter or line, of an element
  • Insert content before or after an element
  • Style the markers of list items
  • Style the viewbox behind a dialog box

The table below shows the different pseudo-elements in CSS:

Pseudo-element Example Example description
::after p::after
div::after
Inserts something after the content of the specified element
::backdrop dialog::backdrop Styles the viewbox behind a dialog box or popover element
::before p::before
div::before
Inserts something before the content of the specified element
::file-selector-button ::file-selector-button Selects any button of type <input type="file">
::first-letter p::first-letter Selects the first letter of every <p> element
::first-line p::first-line Selects the first line of every <p> element
::grammar-error ::grammar-error Styles a text that the browser has flagged as grammatically incorrect
::highlight() ::highlight(custom-name) Selects a custom highlight
::marker ::marker Selects the markers of list items
::placeholder input::placeholder
textarea::placeholder
Styles the placeholder text of <input> or <textarea> elements
::selection ::selection Styles the user-selected text
::spelling-error ::spelling-error Styles a text that the browser has flagged as incorrectly spelled
::view-transition ::view-transition Represents the root of the view transitions overlay, which contains all view transition on the page
::view-transition-group ::view-transition-group Represents a single view transition snapshot group
::view-transition-image-pair ::view-transition-image-pair Represents a container for a view transition's "old" and "new" view states - before and after the transition
::view-transition-new ::view-transition-new Represents the "new" view state of a view transition
::view-transition-old ::view-transition-old Represents the "old" view state of a view transition


Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.