从 W3Schools.cn 开始学习 WEB 编程技术

CSS 教程

CSS HOME CSS Introduction CSS Syntax CSS Selectors CSS How To CSS Comments CSS Colors CSS Backgrounds CSS Borders CSS Margins CSS Padding CSS Height/Width CSS Box Model CSS Outline CSS Text CSS Fonts CSS Icons CSS Links CSS Lists CSS Tables CSS Display CSS Max-width CSS Position CSS Overflow CSS Float CSS Inline-block CSS Align CSS Combinators CSS Pseudo-class CSS Pseudo-element CSS Opacity CSS Navigation Bar CSS Dropdowns CSS Image Gallery CSS Image Sprites CSS Attr Selectors CSS Forms CSS Counters CSS Website Layout CSS Units CSS Specificity

CSS 高级教程

CSS Rounded Corners CSS Border Images CSS Backgrounds CSS Colors CSS Gradients CSS Shadows CSS Text Effects CSS Web Fonts CSS 2D Transforms CSS 3D Transforms CSS Transitions CSS Animations CSS Tooltips CSS Style Images CSS object-fit CSS Buttons CSS Pagination CSS Multiple Columns CSS User Interface CSS Variables CSS Box Sizing CSS Media Queries CSS MQ Examples CSS Flexbox

CSS 响应式

RWD Intro RWD Viewport RWD Grid View RWD Media Queries RWD Images RWD Videos RWD Frameworks RWD Templates

CSS 网格视图

Grid Intro Grid Container Grid Item

CSS 实例

CSS Templates CSS Examples CSS Quiz CSS Exercises

CSS 参考手册

CSS 参考手册 CSS 浏览器支持 CSS 选择器 CSS 函数 CSS Web 安全字体 CSS 动画相关属性 CSS 单位 CSS PX-EM 转换 CSS 颜色 CSS 颜色值 CSS 默认值 CSS 实体 CSS 听觉

CSS 教程

CSS

CSS 是一种描述 HTML 文档样式的语言。

CSS 描述应该如何显示 HTML 元素。

本教程将从零起点的基础教程开始,一直到 CSS3 高级教程,为您提供全面系统地讲解。

Start learning CSS now »

每章中的实例

本 CSS 教程包含数百个 CSS 实例。

通过使用我们的在线编辑器(w3schools TIY),您可以编辑 CSS,然后单击运行按钮来查看结果。

CSS 实例

body {
  background-color: lightblue;
}

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

p {
  font-family: verdana;
  font-size: 20px;
}
亲自试一试 »

点击 "Try it Yourself" 按钮查看运行结果。


CSS 实例

从 300 多个实例中学习!使用我们的在线编辑器,您可以编辑 CSS,然后单击运行按钮来查看结果。

访问 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 .


CSS Templates

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 Templates!



CSS 习题和测验

在 W3Schools 测试您的 CSS 技能!

Start CSS Exercises!

Start CSS Quiz!


CSS 参考手册

在 W3School,您将找到所有属性和选择器的完整 CSS 参考手册,包括语法、示例、浏览器支持等。

CSS Properties Reference

CSS Selectors Reference

CSS Functions Reference

CSS Animatable Reference

CSS Aural Reference

CSS Units

CSS Color Reference

CSS Default Values

CSS Browser Support