How to set a responsive image in the background?

how can i set a responsive image in the background?
I set in the css background size: cover, but i didn't see any changes