Class Ext.util.CSS
Package: | Ext.util |
Class: | CSS |
Extends: | Object |
Defined In: | CSS.js |
Utility class for manipulating CSS rules
This class is a singleton and cannot be created directly.
属性
-
方法
-
事件
公共属性
此类没有公共属性。
公共方法
|
createStyleSheet(String cssText ) : StyleSheet |
CSS |
Very simple dynamic creation of stylesheets from a text blob of rules. The text will wrapped in a style
tag and appe... |
|
getRule(String/Array selector , Boolean refreshCache ) : CSSRule |
CSS |
Gets an an individual CSS rule by selector(s) |
|
getRules(Boolean refreshCache ) : Object |
CSS |
Gets all css rules for the document |
|
refreshCache() : Object |
CSS |
Refresh the rule cache if you have dynamically added stylesheets |
|
removeStyleSheet(String id ) : void |
CSS |
Removes a style or link tag by id |
|
swapStyleSheet(String id , String url ) : void |
CSS |
Dynamically swaps an existing stylesheet reference for a new one |
|
updateRule(String/Array selector , String property , String value ) : Boolean |
CSS |
Updates a rule property |
公共事件
此类没有公共事件。
方法详情
createStyleSheet
public function createStyleSheet(String cssText
)
Very simple dynamic creation of stylesheets from a text blob of rules. The text will wrapped in a style
tag and appended to the HEAD of the document.
This method is defined by CSS.
getRule
public function getRule(String/Array selector
, Boolean refreshCache
)
Gets an an individual CSS rule by selector(s)
This method is defined by CSS.
getRules
public function getRules(Boolean refreshCache
)
Gets all css rules for the document
This method is defined by CSS.
refreshCache
public function refreshCache()
Refresh the rule cache if you have dynamically added stylesheets
This method is defined by CSS.
removeStyleSheet
public function removeStyleSheet(String id
)
Removes a style or link tag by id
参数:
id
: StringThe id of the tag
返回:
This method is defined by CSS.
swapStyleSheet
public function swapStyleSheet(String id
, String url
)
Dynamically swaps an existing stylesheet reference for a new one
This method is defined by CSS.
updateRule
public function updateRule(String/Array selector
, String property
, String value
)
This method is defined by CSS.