Table of Contents

Class CSSKeyframesRule

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll

The CSSKeyframesRule interface describes an object representing a complete set of keyframes for a CSS animation. It corresponds to the contents of a whole @keyframes at-rule.

[Value("CSSKeyframesRule")]
public class CSSKeyframesRule : CSSRule
Inheritance
CSSKeyframesRule
Inherited Members

Remarks

-@keyframes
-CSSKeyFrameRule

See also on MDN

Constructors

CSSKeyframesRule()

public CSSKeyframesRule()

Properties

CssRules

The read-only cssRules property of the CSSKeyframeRule interface returns a CSSRuleList containing the rules in the keyframes at-rule.

[Value("cssRules")]
public CSSRuleList CssRules { get; }

Property Value

CSSRuleList

A 'CSSRuleList'.

Remarks

NOTE

The CSSKeyframeRule itself is indexable like an array, and functions similarly to its cssRules property.

See also on MDN

Length

The read-only length property of the CSSKeyframeRule interface returns the number of CSSKeyframeRule objects in its list. You can then access each keyframe rule by its index directly on the CSSKeyframeRule object.

[Value("length")]
public ulong Length { get; }

Property Value

ulong

A non-negative integer. It should have the same value as the length of the CssRules property.

Remarks

Name

The name property of the CSSKeyframeRule interface gets and sets the name of the animation as used by the {{cssxref("animation-name")}} property.

[Value("name")]
public string Name { get; set; }

Property Value

string

A string.

Remarks

Methods

AppendRule(string)

The appendRule() method of the CSSKeyframeRule interface appends a CSSKeyFrameRule to the end of the rules.

[Value("appendRule")]
public GlobalObject.Undefined AppendRule(string rule)

Parameters

rule string

Returns

GlobalObject.Undefined

None (GlobalObject.Undefined).

Remarks

DeleteRule(string)

The deleteRule() method of the CSSKeyframeRule interface deletes the CSSKeyFrameRule that matches the specified keyframe selector.

[Value("deleteRule")]
public GlobalObject.Undefined DeleteRule(string select)

Parameters

select string

Returns

GlobalObject.Undefined

None (GlobalObject.Undefined).

Remarks

FindRule(string)

The findRule() method of the CSSKeyframeRule interface finds the CSSKeyFrameRule that matches the specified keyframe selector.

[Value("findRule")]
public CSSKeyframeRule? FindRule(string select)

Parameters

select string

Returns

CSSKeyframeRule

A CSSKeyframeRule which is the last matching rule. If no rules are found, nothing is returned.

Remarks