How to create an HTML 5 Landing Page w/ Video Background

funitect

I want to mimic Spotify's landing page here: https://www.spotify.com/uk/video-splash/?utm_source=spotify&utm_medium=web&utm_campaign=start

I'm fairly new to coding but have created some landing pages before but never one with HTML and video as a background.

I want the same layout as Spotify with NO scrolling capability OR sound. Then I want to be able to click on the button and have a form that someone can fill out and submit. Not quite sure how to go about this.

TLDR:

  • How to do HTML5 Video Background
  • Create JS pop-up like form
  • Where to get videos / format to work as a background
Jonathan Bellavaro

HTML 5 WITH CSS FIX | No Jquery Needed or java

I went ahead and designed some mark up for you so at-least you have something to start with. You can copy this code and play around with it. There are some key points in your CSS for this to work please keep this in mind and you will do just fine:

  • Your Embedded Video Has To Have A the lowest z-index
  • Your width for your video must be set to 100%
  • You must put !Important right behind the 100%
  • You must Use a Fixed Or Absolute Position for all your "divs"
  • If you do not you can not use the z-index option in CSS


  • Heres Your Mark Up & I hope this helps you!
    /* YOUR CSS */
    
    html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
    	margin: 0;
    	padding: 0;
    	border: 0;
    	vertical-align: baseline;
    }
    #wrapper {
    	position: absolute;
        top: 0;
        left: 0;
        border: 0;
        z-index: 1; /* <-- this plays a key roll for it to work */
        width: 100% !important /* <-- this plays a key roll for it to work */
        height: 100%;
    	margin:0;
    	padding:0;
    }
    
    /* Your can customize any div how ever you want this is just an example */
    #login {
    	position: absolute;
    	z-index:2; /* <-- this plays a key roll for it to work */
    	left:45%;
    	top:60%;
    	width:250px;
    	height:100px;
    	background-color: rgba(255,255,255,1.0);
    	background: -webkit-linear-gradient(top, rgba(255,255,255,0.8), rgba(99,99,99,0.8)); /* For Safari 5.1 to 6.0 */
    	background: -o-linear-gradient(top, rgba(255,255,255,0.8), rgba(99,99,99,0.8)); /* For Opera 11.1 to 12.0 */
    	background: -moz-linear-gradient(top, rgba(255,255,255,0.8), rgba(99,99,99,0.8)); /* For Firefox 3.6 to 15 */
    	background: linear-gradient(to bottom, rgba(255,255,255,0.8), rgba(99,99,99,0.8)); /* Standard syntax (must be last) */
    	border-radius:7px;
    }
    #login a{
    	color:#fff;
    	text-decoration:none;
    	font-size:30px;
    }
    #login p{
    	padding-top:35px;
    	padding-left:18px;
    }
    /* Your can customize any div how ever you want this is just an example */
    #footer {
    	position:fixed;
    	bottom:0;
    	width:100%;
    	height:50px;
    	background-color: rgba(0,0,0,0.8);
    	z-index:3; /* <-- this plays a key roll for it to work */
    }
    #footer p{
    	text-align:center;
    	color:#fff;
    	padding-top:10px;
    }
    <html>
    <body>
    <!--Place your video right after the body tag-->
    <!--Notice the id="wrapper" is placed in the <video id="wrapper"></video>-->
    <video id="wrapper" autoplay loop ?wmode=transparent>
    <source src="http://sectorvi.com/yourmovie.mp4" type="video/mp4">
    </video>
    
    <div id="login"><p><a href="#">JOIN FOR FREE</a></p></div>
    <div id="footer"><p>Remember this will only work if you have fixed or absolute postions with enables you to use z-index. ~ Jonathan Bellavaro</p></div>
      
    
    </body>
    </html>

    You can view in full here: http://sectorvi.com/stackoverflow-funitect.html

    Hope this gives you a good start.

    Collected from the Internet

    Please contact [email protected] to delete if infringement.

    edited at
    0

    Comments

    0 comments
    Login to comment

    Related

    From Dev

    Youtube video as background on landing page

    From Dev

    How to create a video background in a responsive web page?

    From Dev

    How to add background video to html page?

    From Dev

    How to create a full screen div on landing page

    From Dev

    How to create a full screen div on landing page

    From Dev

    How to debug HTML5/CSS for background video in RoR app

    From Dev

    How to debug HTML5/CSS for background video in RoR app

    From Dev

    How to change zoom mode of a background html5 video?

    From Dev

    how to create a landing page for the first time visitors only in PHP

    From Dev

    Routing in static html landing page

    From Dev

    How to correctly create HTML5 audio and video with JavaScript

    From Dev

    Set position background video html5

    From Dev

    HTML5 video background does not load

    From Dev

    large video html5 background

    From Dev

    html5 Background Video Full Screen

    From Dev

    Sound is still playing in Background HTML 5 Video

    From Dev

    Creating a section with video as background HTML5

    From Dev

    media queries for HTML5 background video

    From Dev

    Sound is still playing in Background HTML 5 Video

    From Dev

    large video html5 background

    From Dev

    Creating a section with video as background HTML5

    From Dev

    HTML5 Dynamic Video Background

    From Dev

    How do I Add A GIF/Video To Landing Screen Background In Xcode 6 using swift?

    From Dev

    How to add video to html page ?

    From Dev

    Html5 video background, keep center of video in center

    From Dev

    Dynamically create a HTML5 video element without it being shown in the page

    From Dev

    How do I create a video background?

    From Dev

    Changing the Landing page cq5 publish

    From Dev

    How to add Youtube video in the background of HTML section

    Related Related

    HotTag

    Archive