specified value

specified value

The specified value of a CSS property is set in one out of three ways.

  1. If the document's stylesheet has specified a value for the property then it will be used. For example; if the color property is set to green then the text color of the corresponding element will be green-
  2. If the document's stylesheet has not specified a value then it will be inherited form the parent element (if possible)- For example; if we have a paragraph (<p>) inside a <div> and the <div> has a CSS font property value of "Arial" and the <p> doesn't have a font property defined then it will inherit the Arial font.
  3. If none of the above are available, the initial value for the element as specified by the CSS specification is applied.

Specifications

Specification Status Comment
CSS Level 2 (Revision 1)
The definition of 'cascaded value' in that specification.
Recommendation Initial definition

See also

© 2005–2017 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/CSS/specified_value

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部