Tutorials 参考 练习 Menu
Paid Courses

CSS 教程

CSS首页 CSS简介 CSS语法 CSS选择器 CSS如何 CSS注释 CSS颜色 CSS背景 CSS边框 CSS边距 CSS填充 CSS高度/宽度 CSS Box模型 CSS大纲 CSS文字 CSS字体 CSS图标 CSS链接 CSS列表 CSS表 CSS显示 CSS最大宽度 CSS位置 CSS溢出 CSS浮动 CSS内联块 CSS对齐 CSS组合器 CSS伪类 CSS伪元素 CSS不透明度 CSS导航栏 CSS下拉列表 CSS图片库 CSS图像精灵 CSS属性选择器 CSS表格 CSS计数器 CSS网站布局 CSS单位 CSS特异性 CSS !important


CSS圆角 CSS边框图片 CSS背景 CSS颜色 CSS Color Keywords CSS渐变 CSS阴影 CSS文字 Effects CSS Web字体 CSS 2D转换 CSS 3D变形 CSS过渡 CSS动画 CSS工具提示 CSS样式图片 CSS Image Reflection CSS对象适合 CSS object-position CSS按钮 CSS分页 CSS多列 CSS用户界面 CSS变量 CSS Box大小 CSS媒体查询 CSS MQ示例 CSS Flexbox

CSS 自适应

RWD简介 后视视口 RWD网格视图 RWD媒体查询 RWD图像 RWD视频 RWD框架 RWD模板

CSS 网格

网格介绍 网格容器 网格项


SASS Tutorial

CSS 示例

CSS模板 CSS示例 CSS测验 CSS 练习 CSS证书

CSS 参考

CSS参考 CSS选择器 CSS功能 CSS参考 Aural CSS Web安全字体 CSS动画 CSS单位 CSS PX-EM转换器 CSS颜色 CSS颜色值 CSS默认值 CSS浏览器支持

CSS Tutorial


CSS is the language we use to style an HTML document.

CSS describes how HTML elements should be displayed.

This tutorial will teach you CSS from basic to advanced.

Start learning CSS now »

示例 in Each Chapter

This CSS tutorial contains hundreds of CSS examples.

With our online editor, you can edit the CSS, and click on a button to view the result.

CSS Example

body {
  background-color: lightblue;

h1 {
  color: white;
  text-align: center;

p {
  font-family: verdana;
  font-size: 20px;
来试试吧 »

Click on the "来试试吧" button to see how it works.


Learn from over 300 examples! With our editor, you can edit the CSS, and click on a button to view the result.

Go to CSS示例!

Use the Menu

We recommend reading this tutorial, in the sequence listed in the menu.

If you have a large screen, the menu will always be present on the left.

If you have a small screen, open the menu by clicking the top menu sign .


We have created some responsive W3.CSS templates for you to use.

You are free to modify, save, share, and use them in all your projects.

Free CSS模板!

CSS 练习 and 测试 Test

Test your CSS skills at W3Schools!

Start CSS 练习!

Start CSS测验!

CSS 参考

At W3Schools you will find complete CSS references of all properties and selectors with syntax, examples, browser support, and more.

CSS Properties 参考

CSS选择器 参考

CSS功能 参考

CSS动画 参考

CSS Aural 参考


CSS Color 参考



Kickstart your career

Get certified by completing the course

Get certified w3schools CERTIFIED . 2021

W3Schools is optimized for learning and training. 示例 might be simplified to improve reading and learning. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookie and privacy policy.

Copyright 1999-2021 by Refsnes Data. All Rights Reserved.
W3Schools is Powered by W3.CSS.