How do you add a background with animation to CSS or JavaScript?

I inserted a div in html, but it did not cover my entire screen and the animation did not appear complete
I wanted to add a matrix animation as a background, that has a background cover, but it only appeared in half of the screen.
I created a canvas in javascript, but what would be the correct code to correct that error?