网页
综合
更新时间 2025-11-13 17:22:29
CSS reference - CSS | MDN
自动蜘蛛
developer.mozilla.org
正文约 3095 字
HTML: Markup language
CSS: Styling language
JavaScript: Scripting language
Web APIs: Programming interfaces
Learn web development
Get to know MDN better
Use this CSS reference to browse an alphabetical index of all of the standard CSS properties, pseudo-classes, pseudo-elements, data types, functional notations and at-rules. You can also browse key CSS concepts and a list of selectors organized by type. Also included is a brief DOM-CSS / CSSOM reference.
See the index of selectors, pseudo-classes, and pseudo-elements below. The syntax for each specified value depends on the data type defined for each specified property.
For a beginner-level introduction to the syntax of selectors, see our guide on CSS Selectors. Be aware that any syntax error in a rule definition invalidates the entire rule. Invalid rules are ignored by the browser. Note that CSS rule definitions are entirely (Unicode) text-based, whereas DOM-CSS / CSSOM (the rule management system) is object-based.
As the structure of at-rules varies widely, please see At-rule to find the syntax of the specific one you want.
Note: This index does not include SVG-exclusive presentation attributes, which can be used as CSS properties on SVG elements.
Note: The property names in this index do not include the JavaScript names which do differ from the CSS standard names.
The following are the various selectors, which allow styles to be conditional based on various features of elements within the DOM.
Basic selectors are fundamental selectors; these are the most basic selectors that are frequently combined to create other, more complex selectors.
Specifies that both A and B elements are selected. This is a grouping method to select several matching elements.
Combinators are selectors that establish a relationship between two or more simple selectors, such as "A is a child of B" or "A is adjacent to B", creating a complex selector.
Specifies that the elements selected by both A and B have the same parent and that the element selected by B immediately follows the element selected by A horizontally.
Specifies that the elements selected by both A and B share the same parent and that the element selected by A comes before—but not necessarily immediately before—the element selected by B.
Specifies that the element selected by B is the direct child of the element selected by A.
Specifies that the element selected by B is a descendant of the element selected by A, but is not necessarily a direct child.
Specifies that the element selected by B is located within the table column specified by A. Elements which span multiple columns are considered to be a member of all of those columns.
Specifies a special state of the selected element(s).
Represents entities that are not included in HTML.
See also selectors in the Selectors specification and the pseudo-element specification.
This page was last modified on Nov 13, 2025 by MDN contributors.
Your blueprint for a better internet.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.
本页为82搜索生成的网页快照,内容来自站内索引;演示数据的原文链接仅作示例。