<!DOCTYPE html>
<style>
@keyframes anim {
0% { background-color: black; }
100% { background-color: yellow; }
}
</style>
<script>
document.styleSheets[0].cssRules[0].cssRules[0].style.setProperty('background-color', 'red', 'important');
</script>