How to put video as background image with no lag?

PenguinManiac

Member
Registered
Joined
Jun 27, 2017
Messages
59
Points
8
Some websites, like PayPal, have started to use videos as their background, which makes for a lively (and lovely, I'd say) homepage that is assured to make a sense of trust grow in its users.
Still...how did they manage to make it run without lag? It sounds like a daunting task to me, considering even simple CSS effects can cause major slowdowns, but a freaking video doesn't. What sorcery is this?
 

VirtuBox

Well-known member
Registered
Joined
May 3, 2016
Messages
1,622
Points
83

ClintAnthony

New member
Registered
Joined
Oct 28, 2017
Messages
9
Points
0
You can use
Code:
div
which has
Code:
img
tag inside of it and set the
Code:
z-index
into negative so that the other element will overlap the image.

Base on my experience, you need to covert the video into possible smaller size. What I mean by this is that convert into lower size but not too much so that you will not lose the quality of the video.

And another thing, if you want your video to be in the background and play it without any lag, use jquery and load the content of the page first before opening it, so when your visitor open your page the video will play continously.
 
Older Threads
Replies
2
Views
2,152
Replies
0
Views
1,716
Newer Threads
Latest Threads
Replies
0
Views
36
Replies
0
Views
174
Replies
0
Views
81
Replies
0
Views
75

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top