-
CSS align-content Property
The CSS align-content property aligns a flex container’s lines when there is available space vertically (on the cross-axis). The align-content property is one of the CSS3 properties. When there is only one line in the flexbox, this property will not affect. It needs multiple lines within a flexible container. The value “stretch” is this property’s default value. The align-content property accepts the following values:…
-
CSS :visited Pseudo Class
The :visited selector selects and styles visited links in the page. The :visited pseudo-class applies when the link has been visited by the user. If we try to add style to the visited links by giving them a style property (e.g., background-image) it will not work in modern browsers. But the style properties will work properly if we use any…
-
CSS :valid Pseudo Class
The :valid pseudo-class selects <form> elements with a value that validates according to the element’s settings. The :valid selector only works for form <input> elements with min and max attributes, email fields with a legal email, number fields with a numeric value or required fields with not empty value. Version HTML Living Standard HTML5 Selectors Level 4 Syntax Example of the :valid selector:
-
CSS :target Pseudo Class
The :target pseudo-class is used to highlight the section of a page linked to from a table of contents. It styles an element that is the target of an internal link in a document. The :target pseudo-class represents the target element with an id matching the URL’s fragment. Pure-CSS lightbox The :target pseudo-class is used to create a lightbox…
-
CSS ::selection Pseudo Element
The ::selection pseudo-element is a highlighted part of the document. It is used to apply styles to the part of a document that has been highlighted by the user (such as clicking and dragging the mouse across text). The default text selection background color is blue, and this property is used to change the default color. Only…
-
CSS :scope Pseudo Class
The CSS :scope pseudo-class represents elements that are a reference point for selectors. The :scope is the same as :ro:scope { css declarations; }ot since, at the moment, there is not a way to explicitly establish a scoped element. Scope element is an element forming a context for a block of styles. Version Selectors Level 4 Syntax Example of the :scope…
-
CSS :root Pseudo Class
The :root pseudo-class selects the element that represents the root of the document. In HTML, the root element is always <html>. In SVG and XML, the :root pseudo-class can refer to a higher-level ancestor. The :root pseudo-class can be linked with pseudo-elements (e.g., ::after) and other pseudo-classes (e.g., :hover). Version Selectors Level 4 Selectors Level 3 Syntax Example of the :root pseudo-class:
-
CSS :required Pseudo Class
The :required selector selects those elements that are required. The :required selector selects form elements that have the required attribute set. Before submission forms can indicate which fields should have valid data which allows the user to avoid the unnecessary wait. It only applies to the form elements <input>, <select> and <textarea>. The :required selector can be linked with pseudo-elements (e.g. ::after) and other selectors (e.g. :hover). Non-required elements…
-
CSS :read-write Pseudo Class
The :read-write selector selects elements which are editable by the user. Elements that are editable include: The :read-only selector is the counterpart of the :read-write selector. It selects all elements not match :read-write. Version HTML5 Selectors Level 4 Syntax Example of the :read-write selector:
-
CSS :read-only Pseudo Class
The :read-only selector selects elements which are “readonly”. Those are the elements that are not editable by the user. Elements that are editable include: The :read-only selector can be linked with other selectors (e.g. :hover) and with pseudo-elements (e.g. ::after). The :read-only pseudo-class selector is supported with the -moz- prefix in Firefox in the following form: -moz-read-only. Example of…
