网页 综合 更新时间 2026-01-08 01:40:09

CSS selectors - CSS | MDN

自动蜘蛛 developer.mozilla.org 正文约 848 字
HTML: Markup language
CSS: Styling language
JavaScript: Scripting language
Web APIs: Programming interfaces
Learn web development
Get to know MDN better
CSS selectors are patterns used in CSS rules to target and select specific elements for styling.
Note: This page is an index of all selectors in CSS. The CSS selectors page introduces the module that defines some, but not all, of these selectors.
For example, to style paragraphs, you will use the p type selector to select all <p> elements and apply a style to them:
Check the pseudo-classes and pseudo-elements pages for their respective specification tables.
This page was last modified on Jan 8, 2026 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.
访问原文 返回搜索 https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Selectors
本页为82搜索生成的网页快照,内容来自站内索引;演示数据的原文链接仅作示例。