级联样式表 ( CSS ) 是 样式表 语言用于描述文档的呈现编写在 HTML or XML (包括 XML 方言,譬如 SVG , MathML or XHTML )。CSS 描述元素在屏幕中、纸上、语音或其它媒体中应如何呈现。

CSS 是其中的核心语言对于 开放 Web 且被标准化为跨 Web 浏览器根据 W3C 规范 。以前,CSS 规范各个部分的开发是同步完成的,允许版本化最新推荐。你可能听说过 CSS1、CSS2.1、CSS3。不管怎样,CSS4 从未变为官方版本。

从 CSS3 起,规范的领域显著增加,不同 CSS 模块的进度开始有差异很大,这变得更有效对于 每个模块的单独开发和发行推荐 。代替版本化 CSS 规范,W3C 现在会定期快照 CSS 规范的最新稳定状态 .

  • CSS 介绍

    若您是 Web 开发新手,务必阅读我们的 CSS 基础知识 文章了解什么是 CSS 及如何使用它。

  • CSS 教程

    我们的 CSS 学习区域 包含大量教程,带您从初学者水平到精通,涵盖所有基础。

  • CSS 参考

    我们的 详尽 CSS 参考 为经验丰富的 Web 开发者描述 CSS 的每个特性和概念。

想成为前端 Web 开发者吗?




我们的 CSS 学习区域 特征化了从头开始教授 CSS 的多个模块 - 不需要先前的知识。

CSS 第一步
CSS (级联样式表) 用于样式化和布局网页 — 例如,更改内容的字体、颜色、大小和间距,将其拆分成多列,或添加动画及其它装饰特征。此模块为您掌握 CSS 工作原理、语法、及如何开始使用 CSS 为 HTML 添加样式提供温和开端。
CSS 构建块

This module carries on where CSS 第一步 left off — now you've gained familiarity with the language and its syntax, and got some basic experience with using it, it's time to dive a bit deeper. This module looks at the cascade and inheritance, all the selector types we have available, units, sizing, styling backgrounds and borders, debugging, and lots more.

The aim here is to provide you with a toolkit for writing competent CSS and help you understand all the essential theory, before moving on to more specific disciplines like 文本样式化 and CSS 布局 .

With the basics of the CSS language covered, the next CSS topic for you to concentrate on is styling text — one of the most common things you'll do with CSS. Here we look at text styling fundamentals, including setting font, boldness, italics, line and letter spacing, drop shadows, and other text features. We round off the module by looking at applying custom fonts to your page, and styling lists and links.
CSS 布局
At this point we've already looked at CSS fundamentals, how to style text, and how to style and manipulate the boxes that your content sits inside. Now it's time to look at how to place your boxes in the right place in relation to the viewport, and to each other. We have covered the necessary prerequisites so we can now dive deep into CSS layout, looking at different display settings, modern layout tools like flexbox, CSS grid, and positioning, and some of the legacy techniques you might still want to know about.
使用 CSS 解决常见问题
This module provides links to sections of content explaining how to use CSS to solve common problems when creating a web page.



CSS 布局食谱 aims to bring together recipes for common layout patterns, things you might need to implement in your sites. In addition to providing code you can use as a starting point in your projects, these recipes highlight the different ways layout specifications can be used, and the choices you can make as a developer.

Tools for CSS development




  • 最后修改:


  1. CSS
  2. CSS 参考