这是
实验性技术
检查
浏览器兼容性表格
要小心谨慎在生产中使用这之前。
CSSNamespaceRule
interface describes an object representing a single CSS
@namespace
at-rule
. It implements the
CSSRule
interface, with a type value of
10
(
CSSRule.NAMESPACE_RULE
).
The syntax is described using the WebIDL 格式。
interface CSSNamespaceRule : CSSRule {
readonly attribute DOMString namespaceURI;
readonly attribute DOMString? prefix;
};
由于
CSSRule
,
CSSNamespaceRule
also implements the properties of that interface. It has some specific properties:
CSSNamespaceRule.namespaceURI
DOMString
containing the text of the URI of the given namespace.
CSSNamespaceRule.prefix
DOMString
with the name of the prefix associated to this namespace. If there is no such prefix, returns
null
.
由于
CSSRule
,
CSSNamespaceRule
also implements the methods of that interface. It has
no
specific methods:
| 规范 | 状态 | 注释 |
|---|---|---|
|
CSS Object Model (CSSOM)
The definition of 'CSSNamespaceRule' in that specification. |
工作草案 | 初始定义。 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
CSSNamespaceRule
|
Chrome 47 | Edge ≤18 | Firefox 59 | IE No | Opera 36 | Safari Yes | WebView Android 47 | Chrome Android 47 | Firefox Android 59 | Opera Android 36 | Safari iOS Yes | Samsung Internet Android 5.0 |
namespaceURI
|
Chrome 47 | Edge 12 | Firefox 59 | IE No | Opera 36 | Safari Yes | WebView Android 47 | Chrome Android 47 | Firefox Android 59 | Opera Android 36 | Safari iOS Yes | Samsung Internet Android 5.0 |
prefix
|
Chrome 47 | Edge 12 | Firefox 59 | IE No | Opera 36 | Safari Yes | WebView Android 47 | Chrome Android 47 | Firefox Android 59 | Opera Android 36 | Safari iOS Yes | Samsung Internet Android 5.0 |
完整支持
不支持
CSSNamespaceRule
AnimationEvent
CSS
CSSConditionRule
CSSGroupingRule
CSSKeyframeRule
CSSKeyframesRule
CSSMediaRule
CSSPageRule
CSSRule
CSSRuleList
CSSStyleDeclaration
CSSStyleRule
CSSStyleSheet
CSSSupportsRule
CaretPosition
LinkStyle
MediaQueryList
MediaQueryListListener
Screen
StyleSheet
StyleSheetList
TransitionEvent