Personalized checkout and custom promotions with Shopify Scripts
Hi!
I added some background videos to my store using the following custom liquid code and they look grear, but when changing into mobile the size is too small for the screen. Also the autoplay doesn't work on mobile as well 😞
Can anyone help me to set the code to resize and autoplay when using mobile?
This is the code that I used:
<style>
video {
display: block;
margin: 0 auto;
width: 100%;
height: 50%;
}
</style>
<video autoplay loop playsinline muted>
<source src="VIDEO URL HERE">
</video>
This is my store
https://doufoods.com/
password: douweb
Perfect size for desktop
Way too small for mobile and no autoplay
Thank you in advance!
Thank you for reaching out and posting this question!
Sorry you are facing this issue, it would be my pleasure to help you.
Welcome to the Shopify community!😊
Thanks for your good question.
Please share your site URL,
I will check out the issue and provide you a solution here.
Thank you in advance @KetanKumar!
This is my site
https://doufoods.com/
password: douweb
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025