Jump to content

Only display mobile fall back image on mobile?

Go to solution Solved by tuanphan,

Recommended Posts

Posted (edited)

I have video thumbnails on my site for desktop but am trying to make the mobile fallback image display only for mobile devices. Right now the video loads on mobile and it looks low quality, so would prefer to only have the fallback static image show for mobile screens. And keep the video for desktop. Any help would be appreciated! 

https://www.bryanbarnes.me/

 

Edited by bryanb11
Adding URL
  • Replies 6
  • Views 669
  • Created
  • Last Reply

Top Posters In This Topic

Posted
8 hours ago, tuanphan said:

Hi,

You mean video of projects on homepage?

Yeah exactly, I would like them to be stills for mobile. But keep what it looks like on desktop. TY!

Posted
On 7/7/2023 at 10:17 PM, bryanb11 said:

Yeah exactly, I would like them to be stills for mobile. But keep what it looks like on desktop. TY!

Try adding this to Design > Custom CSS

/* Mobile video homepage */
@media screen and (max-width:767px) {
body.homepage div#player {
    visibility: hidden !important;
    opacity: 0 !important;
}
body.homepage .sqs-video-background.mobile .custom-fallback-image {
    opacity: 1 !important;
    display: block !important;
    z-index: 10 !important;
}
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Posted

Thank you! I tried this and when i look at it the site on mobile, it seems that it is not showing the fall back image. Is there a fix? Thanks again

  • Solution
Posted
On 7/9/2023 at 10:44 PM, bryanb11 said:

Thank you! I tried this and when i look at it the site on mobile, it seems that it is not showing the fall back image. Is there a fix? Thanks again

Use this new code

/* Mobile video homepage */
@media screen and (max-width:767px) {
body.homepage div#player {
    visibility: hidden !important;
    opacity: 0 !important;
}
body.homepage .sqs-video-background .custom-fallback-image {
    opacity: 1 !important;
    display: block !important;
    z-index: 10 !important;
}
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.