Skip to content

Instantly share code, notes, and snippets.

@srikat

srikat/style.css Secret

Last active August 29, 2015 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save srikat/cfbf2c15c5d383f01872 to your computer and use it in GitHub Desktop.
Save srikat/cfbf2c15c5d383f01872 to your computer and use it in GitHub Desktop.
How to replace image background with a video for Front Page 1 section of Altitude Pro. https://sridharkatakam.com/how-to-replace-image-background-with-a-video-for-front-page-1-section-of-altitude-pro/
$images = apply_filters( 'altitude_images', array( '1', '3', '5', '7' ) );
$images = apply_filters( 'altitude_images', array( '3', '5', '7' ) );
$opts = apply_filters( 'altitude_images', array( '1', '3', '5', '7' ) );
$opts = apply_filters( 'altitude_images', array( '3', '5', '7' ) );
genesis_widget_area( 'front-page-1', array(
'before' => '<div id="front-page-1" class="front-page-1"><div class="image-section"><div class="flexible-widgets widget-area' . altitude_widget_area_class( 'front-page-1' ) . '"><div class="wrap">',
'after' => '</div></div></div></div>',
) );
genesis_widget_area( 'front-page-1', array(
'before' => '<div id="front-page-1" class="front-page-1"><div class="image-section video-section"><div class="flexible-widgets widget-area' . altitude_widget_area_class( 'front-page-1' ) . '">',
'after' => '</div></div></div>',
) );
<div class="introvideo">
<video poster="images/background-dock.jpg" autoplay="true" loop="true">
<source src="videos/dock.mp4" type='video/mp4' />
<source src="videos/dock.webm" type='video/webm' />
<source src="videos/dock.ogv" type='video/ogg' />
</video>
</div>
<div class="wrap">
<h2>Dominate Your Market with <br />the Rainmaker Platform</h2>
<p><a class="button" href="/altitude/#front-page-7">Sign Up Now</a> <a class="button clear white" href="/altitude/#front-page-2">Learn More</a></p>
<p><span class="small-disclaimer">Note: Text on this page is for demonstration purposes only and does not represent an actual course.</span></p>
</div>
.image-section.video-section {
background: transparent;
filter: none;
}
/* Video background for Front Page 1 section
--------------------------------------------- */
.front-page-1 {
-webkit-backface-visibility: hidden;
-ms-backface-visibility: hidden;
backface-visibility: hidden;
width: 100%;
background: rgba(0, 83, 103, .3);
text-align: start;
}
.front-page-1 .widget-title {
text-align: center;
}
.front-page-1 .image-section .widget-area {
text-align: start;
}
.introvideo {
width: 100%;
position: absolute;
top: 0;
z-index: -1;
overflow: hidden;
height: 100%;
}
.introvideo video {
width: 100%;
position: absolute;
top: 0;
}
.front-page-1 .wrap {
text-align: center;
}
/*.image-section.video-section {
background: transparent;
filter: none;
}*/
@media only screen and (max-width: 1024px) {
.introvideo {
background: url(images/background-dock.jpg) no-repeat;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
.introvideo video {
display: none;
}
.home-section-1 .widget-title {
padding: 0 5%;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment