Background change after n seconds in CSS

Let's assume that we want to change the background of an element from white to black after 10 seconds:

html
<div class = 'Change'>
    Background will change after 10 seconds. 
</div>

And the CSS:

css
.Change{
    animation: swapBackground 10s;
}

@keyframes swapBackground{
   from {background: white;}
   to   {background: black;}
}

Hi, I'm Erik, an engineer from Barcelona. If you like the post or have any comments, say hi.