Skip to content

Instantly share code, notes, and snippets.

@Terron23
Created March 11, 2018 18:11
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 Terron23/e54202e191406d71f09ba2f4097c1ac8 to your computer and use it in GitHub Desktop.
Save Terron23/e54202e191406d71f09ba2f4097c1ac8 to your computer and use it in GitHub Desktop.
Ken Burns effect with Vegas 2
<div class="container">
<h1>Vegas <strong>2</strong></h1>
<h2>Background slideshow</h2>
<p>Ken Burns effect</p>
</div>
<a href="http://vegas.jaysalvat.com">
Download VEGAS
</a>
$('body').vegas({
overlay: true,
transition: 'fade',
transitionDuration: 4000,
delay: 10000,
color: 'red',
animation: 'random',
animationDuration: 20000,
slides: [
{ src: 'https://ununsplash.imgix.net/reserve/RONyPwknRQOO3ag4xf3R_Kinsey.jpg?fit=crop&fm=jpg&h=700&q=75&w=1600' },
{ src: 'https://unsplash.imgix.net/photo-1414438992182-69e404046f80?fit=crop&fm=jpg&h=625&q=75&w=1600' },
{ src: 'https://unsplash.imgix.net/photo-1414490929659-9a12b7e31907?fit=crop&fm=jpg&h=800&q=75&w=1600' },
{ src: 'https://unsplash.imgix.net/uploads/14129863345840df499fc/0165574c?fit=crop&fm=jpg&h=600&q=75&w=1600' }
]
});
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="//jaysalvat.github.io/vegas/releases/latest/vegas.js"></script>
<link href="//jaysalvat.github.io/vegas/releases/latest/vegas.min.css" rel="stylesheet" />
<link href="//fonts.googleapis.com/css?family=Raleway:400,900" rel="stylesheet" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment