- This topic has 9 replies, 3 voices, and was last updated 3 years, 11 months ago by
Tom.
-
AuthorPosts
-
April 14, 2019 at 12:22 am #868336
Ighty
Hi Tom,
I have the following settings:
Elements (No custom image set)
<video loop muted autoplay poster="http://header-static-picture.jpg" class="background-video"> <source src="http://header-video.mp4" type="video/mp4"> </video> <div class="background-video-content"> <h1 style="font-size:6vw;"><strong><span >TEXT</span></strong></h1> <p style="font-size:2vw;"><span>text</span></p> </div>
CSS
/* hide video on mobile devices */ @media (max-width: 768px) { .background-video { display: none; } }
Please let me know if you want me to add the custom image. At the moment, the effect that I have on desktop is correct which is the video with a light overlay of the colour of the background (blue).
When I add the custom image in elements, the overlay is the image itself (on desktop).Thanks
GeneratePress 2.2.2GP Premium 1.7.8April 14, 2019 at 7:04 am #868604Tom
Lead DeveloperLead DeveloperHi there,
It would be great if you could add the image – then I can write up some CSS for you π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentApril 16, 2019 at 10:08 pm #871111Ighty
Image added π
April 17, 2019 at 12:19 am #871182David
StaffCustomer SupportHi there,
edit that Header Element and add a class to the Element Classes field e.g
video-hero
then add this CSS:@media (min-width: 768px) { .video-hero { background-image: none !important; } }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/April 17, 2019 at 1:18 am #871223Ighty
Nope.
Now I see the video correctly on desktop, but on mobile I still see the image as a layer and no background light overlay.
April 17, 2019 at 10:26 am #871822Tom
Lead DeveloperLead DeveloperIs the background overlay set in your options?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentApril 17, 2019 at 10:31 am #871831Ighty
No, it wasn’t set.
Now it’s activated, I see the video both on mobile and desktop with the light overlay.
April 17, 2019 at 3:27 pm #872041Tom
Lead DeveloperLead DeveloperSo remove the CSS David provided, and add this:
@media (max-width: 768px) { video.background-video { display: none; } } @media (min-width: 769px) { .page-hero.video-hero { background-image: none; } }
Then make sure your background color is set to something with a little transparency. Right now it’s set to a solid
#191f2f
.Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentApril 17, 2019 at 9:59 pm #872178Ighty
Now it’s perfect!
ThanksApril 18, 2019 at 8:48 am #872751Tom
Lead DeveloperLead DeveloperYou’re welcome π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-development -
AuthorPosts
- You must be logged in to reply to this topic.