@keyframes slide-in {
from {
transform: translateX(0%);
}
to {
transform: translateX(100%);
}
}CSSKeyframesRule: findRule() method / notebook
CSSKeyframesRule: findRule() method
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
let myRules = document.styleSheets[0].cssRules;
let keyframes = myRules[0]; // a CSSKeyframesRule
console.log(keyframes.findRule("to")); // a CSSKeyframeRule object