The CSS background properties define the background effects of an element.
CSS的background属性可为元素定义背景效果。设置背景颜色 Set the background colorThis example demonstrates how to set the background color for an element.
实例:
Source Code to Run
[www.21shipin.com] 设置背景图片 Set an image as the backgroundThis example demonstrates how to set an image as the background
实例:
重复背景图片 How to repeat a background imageThis example demonstrates how to repeat a background image.
实例:
背景图片水平重复 How to repeat a background image only horizontallyThis example demonstrates how to repeat a background image only horizontally.
实例:
背景图片垂直重复 How to repeat a background image only verticallyThis example demonstrates how to repeat a background image only vertically.
实例:
图片放在页面上 How to place the background imageThis example demonstrates how to place the image on the page.
实例:
背景图片固定在背景上,不跟随页面一起移动 How to set a fixed background imageThis example demonstrates how to set a fixed background image. The image will not scroll with the rest of the page.
实例:
Source Code to Run
[www.21shipin.com] 一句声明就能设置所有与background属性有关的值 All the background properties in one declarationThis example demonstrates how to use the shorthand property for setting all of the background properties in one declaration.
实例:
Source Code to Run
[www.21shipin.com]