P
P
Pavel Ivanov2015-10-30 16:21:39
css
Pavel Ivanov, 2015-10-30 16:21:39

How to make a fixed (not scrolling with text) looping video as a background in a Wordpress theme?

Guys, we need help!
You need to make a business card site on which the splash screen should be played. I was looking for a way to do this quickly - ready-made themes or plugins, I found two plugins, both non-working and slightly customizable.
If anyone knows a ready-made theme or plugin that is good enough to make a fixed background, can you post it here?
Deadlines are running out and time is short, so cry for help!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nicholas, 2015-10-30
@healqq

You need a plugin to insert a block with position:fixed. I understand correctly?

A
Alex Shalin, 2015-10-30
@restalpo

dfcb.github.io/BigVideo.js
or
tyts

<video autoplay loop poster="polina.jpg" id="bgvid">
    <source src="polina.webm" type="video/webm">
    <source src="polina.mp4" type="video/mp4">
</video>

video#bgvid { 
    position: fixed;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -100;
    -webkit-transform: translateX(-50%) translateY(-50%);
    transform: translateX(-50%) translateY(-50%);
    background: url(polina.jpg) no-repeat;
    background-size: cover; 
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question