CSS Backgrounds and Borders

CSS Backgrounds and Borders 是 CSS 的一个模块,它可以让你为元素的背景和边框设置样式。背景可以用颜色或图像填充,剪裁或调整大小,以及以其他方式修改。边框可以用线条或图像装饰,并制成方形或圆形。此外,元素框可以用阴影装饰。

Reference

CSS 属性

指南

工具

Using multiple backgrounds

Explains how to set one or more backgrounds on an element.

Scaling background images

Describes how to change the size and repeating behavior of background images.

Applying color to HTML elements using CSS

An overview of how CSS color can be used in HTML, including for borders.

Border-image 生成器

此交互式工具让你以可视化方式创建边框图像(border-image 属性)。

Border-radius 生成器

此交互式工具让你以可视化方式创建圆角(border-radius 属性)。

Box-shadow 生成器

此交互式工具让你以可视化方式创建元素身后的阴影(box-shadow 属性)。

规范

Specification
CSS Backgrounds and Borders Module Level 3