CSSKeyframesRule

@native @JSGlobal @JSType

The CSSKeyframesRule interface describes an object representing a complete set of keyframes for a CSS animation. It corresponds to the contains of a whole @@keyframes at-rule. It implements the CSSRule interface with a type value of 7 (CSSRule.KEYFRAMES_RULE).

class CSSRule
class Object
trait Any
class Object
trait Matchable
class Any

Value members

Concrete methods

def appendRule(rule: String): Unit

Inserts a new keyframe rule into the current CSSKeyframesRule. The parameter is a DOMString containing a keyframe in the same format as an entry of a @keyframes at-rule. If it contains more than one keyframe rule, a DOMException with a SYNTAX_ERR is thrown.

Inserts a new keyframe rule into the current CSSKeyframesRule. The parameter is a DOMString containing a keyframe in the same format as an entry of a @keyframes at-rule. If it contains more than one keyframe rule, a DOMException with a SYNTAX_ERR is thrown.

def deleteRule(rule: String): Unit

Deletes a keyframe rule from the current CSSKeyframesRule. The parameter is the index of the keyframe to be deleted, expressed as a DOMString resolving as a number between 0 and 1.

Deletes a keyframe rule from the current CSSKeyframesRule. The parameter is the index of the keyframe to be deleted, expressed as a DOMString resolving as a number between 0 and 1.

def findRule(rule: String): CSSKeyframeRule

Returns a keyframe rule corresponding to the given key. The key is a DOMString containing an index of the keyframe o be returned, resolving to a number between 0 and 1. If no such keyframe exists, findRule returns null.

Returns a keyframe rule corresponding to the given key. The key is a DOMString containing an index of the keyframe o be returned, resolving to a number between 0 and 1. If no such keyframe exists, findRule returns null.

Inherited methods

def hasOwnProperty(v: String): Boolean
Inherited from:
Object
def isPrototypeOf(v: Object): Boolean
Inherited from:
Object
def propertyIsEnumerable(v: String): Boolean
Inherited from:
Object
def toLocaleString(): String
Inherited from:
Object
def valueOf(): Any
Inherited from:
Object

Concrete fields

Returns a CSSRuleList of the CSS rules in the media rule.

Returns a CSSRuleList of the CSS rules in the media rule.

var name: String

Represents the name of the animation, used by the animation-name property.

Represents the name of the animation, used by the animation-name property.

Inherited fields

var CHARSET_RULE: Int
Inherited from:
CSSRule
Inherited from:
CSSRule
var IMPORT_RULE: Int
Inherited from:
CSSRule
Inherited from:
CSSRule
var KEYFRAME_RULE: Int
Inherited from:
CSSRule
var MEDIA_RULE: Int
Inherited from:
CSSRule
Inherited from:
CSSRule
var PAGE_RULE: Int
Inherited from:
CSSRule
var STYLE_RULE: Int
Inherited from:
CSSRule
var UNKNOWN_RULE: Int
Inherited from:
CSSRule
var VIEWPORT_RULE: Int
Inherited from:
CSSRule
var `type`: Int
Inherited from:
CSSRule
var cssText: String

cssText returns the actual text of the style rule. To be able to set a stylesheet rule dynamically, see Using dynamic styling information.

cssText returns the actual text of the style rule. To be able to set a stylesheet rule dynamically, see Using dynamic styling information.

Inherited from:
CSSRule

Returns the containing rule, otherwise null. E.g. if this rule is a style rule inside an @media block, the parent rule would be that CSSMediaRule.

Returns the containing rule, otherwise null. E.g. if this rule is a style rule inside an @media block, the parent rule would be that CSSMediaRule.

Inherited from:
CSSRule

parentStyleSheet returns the stylesheet object in which the current rule is defined.

parentStyleSheet returns the stylesheet object in which the current rule is defined.

Inherited from:
CSSRule