Strange screen

Hello,
I gave a bloc a custom class to change the picture size and position of the background image. The Bloc is set to full screen.
It works good on desktop and tablet, but I got a strange screen in mobile mode

If I change to view. It seems ok.

Maybe it is the wrong method to use custom class to change the size and position of the background image.

Is there another way?

thank you very much

How does it look in preview?

this seems to be ok