Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

  1. Home
  2. General Discussion
  3. Use a video as page background

Use a video as page background

Scheduled Pinned Locked Moved General Discussion
videobackgroundvideobackground
12 Posts 5 Posters 3.5k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N
    N
    Nunomaio
    wrote on last edited by
    #3

    hey, yes.

    http://www.nuno-maio.com/matou so this how its looking like, but i want it like this : http://www.nuno-maio.com/matou2 and then the images scrolling over it.

    thanks you!

    1 Reply Last reply
    0
    • N
      N
      Nunomaio
      wrote on last edited by
      #4

      Hey Armin, could u see it?

      thanks

      best,

      Nuno

      1 Reply Last reply
      0
      • arminunruhA
        arminunruhA
        arminunruh
        Global Moderator
        wrote on last edited by
        #5

        Hey I'm sorry that I didn't look at this earlier.

        Ok so since lay theme can't do this at the moment we can do it by ourselves with custom code :).

        In "Lay Options" -> "Custom CSS & HTML" -> "Custom <head> content" please enter:

        <style>
        .fixed-bg-video {
            position: fixed;
            width: 100%;
            height: 100vh;
            object-fit: cover;
            top: 0;
            left: 0;
            z-index: -1;
        }
        </style>
        

        Now in "Custom HTML at bottom" enter:

        <video class="fixed-bg-video" preload="" muted="" autoplay="" loop="">
            <source src="http://www.nuno-maio.com/wp-content/uploads/2016/10/IMG_6733.m4v" type="video/mp4">
        </video>
        

        Maybe for mobile you want to hide the video.
        In "Custom CSS for Mobile Version" do:

        .fixed-bg-video{
        display: none;
        }
        
        N J 2 Replies Last reply
        0
        • arminunruhA arminunruh

          Hey I'm sorry that I didn't look at this earlier.

          Ok so since lay theme can't do this at the moment we can do it by ourselves with custom code :).

          In "Lay Options" -> "Custom CSS & HTML" -> "Custom <head> content" please enter:

          <style>
          .fixed-bg-video {
              position: fixed;
              width: 100%;
              height: 100vh;
              object-fit: cover;
              top: 0;
              left: 0;
              z-index: -1;
          }
          </style>
          

          Now in "Custom HTML at bottom" enter:

          <video class="fixed-bg-video" preload="" muted="" autoplay="" loop="">
              <source src="http://www.nuno-maio.com/wp-content/uploads/2016/10/IMG_6733.m4v" type="video/mp4">
          </video>
          

          Maybe for mobile you want to hide the video.
          In "Custom CSS for Mobile Version" do:

          .fixed-bg-video{
          display: none;
          }
          
          N
          N
          Nunomaio
          wrote on last edited by
          #6

          @arminunruh HEY!! it worked, thank you so much!!!

          http://www.nuno-maio.com/matou

          one more thing please, i only want this to happen on this page, now the video is in every page how do i make just for this one?

          thank you so much!!!!! :D

          Nuno

          1 Reply Last reply
          0
          • arminunruhA
            arminunruhA
            arminunruh
            Global Moderator
            wrote on last edited by arminunruh
            #7

            Cool! Cool art!
            You can do it like this in "Lay Options" -> "Custom CSS & HTML" -> "Custom CSS for Desktop Version"

            body.slug-matou .fixed-bg-video{
            display: block;
            }
            .fixed-bg-video{
            display:none;
            }
            

            I'm using css that is only for that "matou" page. Here I wrote about how to apply css only to a specific page in lay theme http://laytheme.com/documentation.html#css-based-on-current-page

            N 1 Reply Last reply
            0
            • arminunruhA arminunruh

              Cool! Cool art!
              You can do it like this in "Lay Options" -> "Custom CSS & HTML" -> "Custom CSS for Desktop Version"

              body.slug-matou .fixed-bg-video{
              display: block;
              }
              .fixed-bg-video{
              display:none;
              }
              

              I'm using css that is only for that "matou" page. Here I wrote about how to apply css only to a specific page in lay theme http://laytheme.com/documentation.html#css-based-on-current-page

              N
              N
              Nunomaio
              wrote on last edited by
              #8

              @arminunruh said:

              http://laytheme.com/documentation.html#css-based-on-current-page

              Thank you man!

              And thank you for your help :D

              1 Reply Last reply
              0
              • countachC
                countachC
                countach
                wrote on last edited by
                #9

                Hey @arminunruh

                On this website : www.dominique-sierra.fr, I tried the custom code you gave earlier to show a video as background.

                In custom CSS & HTML :

                <style>
                .fixed-bg-video {
                position: fixed;
                width: 100%;
                height: 100vh;
                object-fit: cover;
                top: 0;
                left: 0;
                z-index: -1;
                }
                </style>

                And in custom HTML at bottom

                <video class="fixed-bg-video" preload="" muted="" autoplay="" loop="">
                <source src="http://www.nuno-maio.com/wp-content/uploads/2016/10/IMG_6733.m4v" type="video/mp4">
                </video>

                The video doesn’t work on mobile version, there is just an image of the video.
                Is there a way to make this work on mobile?

                Thx dude, laytheme is gold

                1 Reply Last reply
                0
                • mariusjopenM
                  mariusjopenM
                  mariusjopen
                  Global Moderator
                  wrote on last edited by
                  #10

                  Hi @countach

                  videos are not possible to display like that on mobile-phones yet.

                  Have a look here.
                  Thats a website I programmed some time ago which looks very similar.
                  http://belius.de/

                  Here I use jQuery to move images around. You can copy that code if you like.
                  All the best!

                  Marius

                  www.mariusjopen.world

                  1 Reply Last reply
                  0
                  • countachC
                    countachC
                    countach
                    wrote on last edited by
                    #11

                    Ok thanks a lot @mariusjopen for having a look, I'll try to use this code;)

                    1 Reply Last reply
                    1
                    • arminunruhA arminunruh

                      Hey I'm sorry that I didn't look at this earlier.

                      Ok so since lay theme can't do this at the moment we can do it by ourselves with custom code :).

                      In "Lay Options" -> "Custom CSS & HTML" -> "Custom <head> content" please enter:

                      <style>
                      .fixed-bg-video {
                          position: fixed;
                          width: 100%;
                          height: 100vh;
                          object-fit: cover;
                          top: 0;
                          left: 0;
                          z-index: -1;
                      }
                      </style>
                      

                      Now in "Custom HTML at bottom" enter:

                      <video class="fixed-bg-video" preload="" muted="" autoplay="" loop="">
                          <source src="http://www.nuno-maio.com/wp-content/uploads/2016/10/IMG_6733.m4v" type="video/mp4">
                      </video>
                      

                      Maybe for mobile you want to hide the video.
                      In "Custom CSS for Mobile Version" do:

                      .fixed-bg-video{
                      display: none;
                      }
                      
                      J
                      J
                      jhc
                      wrote on last edited by
                      #12
                      This post is deleted!
                      1 Reply Last reply
                      0

                      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                      With your input, this post could be even better 💗

                      Register Login
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      Online Users
                      M
                      m.nishizawa
                      Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
                      laytheme.com
                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Search