套件 | mx.styles |
類別 | public class CSSSelector |
繼承 | CSSSelector Object |
語言版本: | ActionScript 3.0 |
產品版本: | Flex 4 |
執行階段版本: | Flash Player 10, AIR 1.5 |
屬性 | 定義自 | ||
---|---|---|---|
ancestor : CSSSelector [唯讀]
If this selector is part of a descendant selector it may have a further
selector defined for an arbitrary ancestor. | CSSSelector | ||
conditions : Array [唯讀]
This selector may match a subset of components by specifying further
conditions (for example, a matching component must have a particular id,
styleName (equivalent to a 'class' condition in CSS) or state
(equivalent to a 'pseudo' condition in CSS)). | CSSSelector | ||
constructor : Object
類別物件的參照或是特定物件實體的建構函數。 | Object | ||
specificity : int [唯讀]
Calculates the specificity of a selector chain in order to determine
the precedence when applying several matching style declarations. | CSSSelector | ||
subject : String [唯讀]
The subject of this selector node (only). | CSSSelector |
方法 | 定義自 | ||
---|---|---|---|
Constructor. | CSSSelector | ||
指出物件是否有已定義的指定屬性。 | Object | ||
指出 Object 類別的實體是否位於指定為參數的物件原型鏈中。 | Object | ||
Determines whether this selector matches the given component. | CSSSelector | ||
指出指定的屬性是否存在,以及是否可列舉。 | Object | ||
為迴圈作業設定動態屬性的可用性。 | Object | ||
傳回代表此物件的字串,根據地區特定慣例進行格式化。 | Object | ||
Returns a String representation of this selector. | CSSSelector | ||
會傳回指定之物件的基本值。 | Object |
ancestor | 屬性 |
ancestor:CSSSelector
[唯讀] 語言版本: | ActionScript 3.0 |
產品版本: | Flex 4 |
執行階段版本: | Flash Player 10, AIR 1.5 |
If this selector is part of a descendant selector it may have a further selector defined for an arbitrary ancestor.
實作
public function get ancestor():CSSSelector
conditions | 屬性 |
conditions:Array
[唯讀] 語言版本: | ActionScript 3.0 |
產品版本: | Flex 4 |
執行階段版本: | Flash Player 10, AIR 1.5 |
This selector may match a subset of components by specifying further conditions (for example, a matching component must have a particular id, styleName (equivalent to a 'class' condition in CSS) or state (equivalent to a 'pseudo' condition in CSS)).
If no conditions are specified, this property is null.
實作
public function get conditions():Array
specificity | 屬性 |
specificity:int
[唯讀] 語言版本: | ActionScript 3.0 |
產品版本: | Flex 4 |
執行階段版本: | Flash Player 10, AIR 1.5 |
Calculates the specificity of a selector chain in order to determine the precedence when applying several matching style declarations. Note that id conditions contribute 100 points, pseudo and class conditions each contribute 10 points, types (including descendants in a chain of selectors) contribute 1 point. Universal selectors (") contribute nothing. The result is the sum of these contributions. Selectors with a higher specificity override selectors of lower specificity. If selectors have equal specificity, the declaration order determines the precedence (the last one wins).
實作
public function get specificity():int
subject | 屬性 |
subject:String
[唯讀] 語言版本: | ActionScript 3.0 |
產品版本: | Flex 4 |
執行階段版本: | Flash Player 10, AIR 1.5 |
The subject of this selector node (only). To get a String representation
of all conditions and descendants of this selector call the toString()
method.
If this selector represents the root node of a potential chain of selectors, the subject also represents the subject of the entire selector expression.
實作
public function get subject():String
CSSSelector | () | 建構函式 |
public function CSSSelector(subject:String, conditions:Array = null, ancestor:CSSSelector = null)
語言版本: | ActionScript 3.0 |
產品版本: | Flex 4 |
執行階段版本: | Flash Player 10, AIR 1.5 |
Constructor.
參數subject:String — The plain representation of this selector without
conditions or ancestors. This is typically a fully-qualified class name; for example,
"spark.components.Button". You can use " to match all components or "global" for a global selector.
| |
conditions:Array (default = null ) — An optional Array of objects of type CSSCondition that is used to match a
subset of component instances. Currently only a single or a pair of
conditions are supported.
| |
ancestor:CSSSelector (default = null ) — An optional selector to match on a component that
descends from an arbitrary ancestor.
|
matchesStyleClient | () | 方法 |
public function matchesStyleClient(object:IAdvancedStyleClient):Boolean
語言版本: | ActionScript 3.0 |
產品版本: | Flex 4 |
執行階段版本: | Flash Player 10, AIR 1.5 |
Determines whether this selector matches the given component.
參數
object:IAdvancedStyleClient — The component to which the selector may apply.
|
Boolean — true if component is a match, or false if not.
|
toString | () | 方法 |
Tue Jun 12 2018, 03:47 PM Z