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

Featured Replies

  • Administrators

CSS Pseudo-elements


CSS Pseudo-Elements

A CSS pseudo-element is a keyword that can be added to a selector, to style a specific part of an element.

Some common use for pseudo-elements:

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

Syntax

Pseudo-elements are denoted by a double colon (::) followed by the pseudo-element name:

selector::pseudo-element-name {
  CSS properties
}

Text Pseudo-elements

Text pseudo-elements style specific parts of text content:

  • ::first-line - Style the first line of text
  • ::first-letter - Style the first letter of text

Learn more about Text Pseudo-elements »


Content Pseudo-elements

Content pseudo-elements insert or style generated content:

  • ::before - Insert content before an element
  • ::after - Insert content after an element
  • ::marker - Style list item markers
  • ::selection - Style user-selected text
  • ::backdrop - Style dialog backdrop

Learn more about Content Pseudo-elements »



CSS Pseudo-elements Reference

For a complete list of all CSS Pseudo-elements, visit our CSS Pseudo-elements Reference.


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.