Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

我们的志愿者还没有将这篇文章翻译为 中文 (简体)加入我们帮助完成翻译!

A CSS property is a characteristic (like color) whose associated value defines one aspect of how the browser should display the element.

Here's an example of a CSS rule:

/* "div" is a selector indicating that all the div elements */
/* in the document will be styled by that rule */
div {
  /* The property "color" with the value "black" indicates */
  /* that the text will have the color black */
  color: black;

  /* The property "background-color" with the value "white" indicates */
  /* that the background color of the elements will be white */ 
  background-color: white;
}

Learn more

General knowledge

Technical reference

 

文档标签和贡献者

 此页面的贡献者: Jeremie, Andrew_Pfeiffer, hbloomer, klez, victoralloza, Nickolay
 最后编辑者: Jeremie,