What's your biggest current challenge? Have your say in Community Polls along the right column.

Re: Change aspect of video-background Mobile and Desktop?

Solved

Change aspect of video-background Mobile and Desktop?

LG999
Shopify Partner
32 0 1

I want to change aspect of Video between Mobile and Desktop?
Keep Desktop video aspect but mobile change to 9:16

https://2d21d4-3.myshopify.com/
LG999

Following pictures 
スクリーンショット 2023-11-20 19.26.42.pngスクリーンショット 2023-11-20 19.27.08.png

Accepted Solution (1)

wattsmork
Shopify Partner
26 8 7

This is an accepted solution.

Hi @LG999 

You can use below code.'

 

 

@media screen and (max-width: 767px) {
    .section-template--14823502184550__9e36d8d0-1c42-442e-b6ce-923c3796141c-padding {
        position: relative;
        padding-top: 177%;
    }

    .section-template--14823502184550__9e36d8d0-1c42-442e-b6ce-923c3796141c-padding video {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

 

 

View solution in original post

Reply 1 (1)

wattsmork
Shopify Partner
26 8 7

This is an accepted solution.

Hi @LG999 

You can use below code.'

 

 

@media screen and (max-width: 767px) {
    .section-template--14823502184550__9e36d8d0-1c42-442e-b6ce-923c3796141c-padding {
        position: relative;
        padding-top: 177%;
    }

    .section-template--14823502184550__9e36d8d0-1c42-442e-b6ce-923c3796141c-padding video {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}