@keyframes slide-in {
from {
transform: translateX(0%);
}
to {
transform: translateX(100%);
}
}CSSKeyframesRule / notebook
CSSKeyframesRule
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
const myRules = document.styleSheets[0].cssRules;
const keyframes = myRules[0]; // a CSSKeyframesRuleconst keyframes = document.styleSheets[0].cssRules[0];
for (let i = 0; i < keyframes.length; i++) {
console.log(keyframes[i].keyText);
}
// Output:
// 0%
// 100%