mauramanor Posted July 26, 2020 Posted July 26, 2020 Site URL: https://blueberry-bellflower-ls7b.squarespace.com/ PASSWORD - SoRight41! I am working on a website with a video as background. This BG Video does not work on mobile, so I have to use a fallback image. The problem is that on page load, this image is visible for 1 or 2 second. Is possible to hide it completely on Desktop? ALSO - just wanna check if there is any work around yet for having the video play on mobile? Thank you 🙂
tuanphan Posted July 26, 2020 Posted July 26, 2020 Add to Home > Design > Custom CSS @media screen and (min-width:641px) { .homepage .Parallax-item:first-child img { visibility: hidden; } } 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!)
rwp Posted July 26, 2020 Posted July 26, 2020 I just added a new plugin for this to my webpage. If the screen is wider than 640px, it will delay the fallback image from being visible for 4 seconds. This way, if the video doesn't load for some reason, the image will show. https://ultraoutlook.com/
HuskiiStudio Posted January 12, 2021 Posted January 12, 2021 I added this code to successfully hide the fallback background image on the homepage for desktop. However it's also hiding the background images on my portfolio pages. How can I only target the homepage? Here's my site's URL: https://magenta-dachshund-daxm.squarespace.com/ Here's the code: .section-background:first-child img { visibility: hidden; } @media (max-width: 740px) { .section-background:first-child img { visibility: visible; } }
tuanphan Posted January 13, 2021 Posted January 13, 2021 23 hours ago, HuskiiStudio said: I added this code to successfully hide the fallback background image on the homepage for desktop. However it's also hiding the background images on my portfolio pages. How can I only target the homepage? Here's my site's URL: https://magenta-dachshund-daxm.squarespace.com/ Here's the code: .section-background:first-child img { visibility: hidden; } @media (max-width: 740px) { .section-background:first-child img { visibility: visible; } } Use this code body.homepage .section-background:first-child img { visibility: hidden; } @media (max-width: 767px) { body.homepage .section-background:first-child img { visibility: visible; } } 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!)
North-Liw Posted August 26, 2021 Posted August 26, 2021 Hi, found this code and it works hiding the fallback image flashing. But it also hides another background image on the page. Is there a way to make it apply to a spesific. block?
tuanphan Posted August 27, 2021 Posted August 27, 2021 20 hours ago, North-Liw said: Hi, found this code and it works hiding the fallback image flashing. But it also hides another background image on the page. Is there a way to make it apply to a spesific. block? Use this code [data-section-id="id here"] .section-background:first-child img { visibility: hidden; } @media (max-width: 767px) { [data-section-id="id here"] .section-background:first-child img { visibility: visible; } } use this tool to find data section id https://chrome.google.com/webstore/detail/squarespace-id-finder/igjamfnifnkmecjidfbdipieoaeghcff?hl=en 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!)
Recommended Posts
Archived
This topic is now archived and is closed to further replies.