Skip to content

Instantly share code, notes, and snippets.

@maicolsantos
Created March 28, 2015 01:21
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 maicolsantos/b3b56e951fb5ef1db719 to your computer and use it in GitHub Desktop.
Save maicolsantos/b3b56e951fb5ef1db719 to your computer and use it in GitHub Desktop.
Pins Simple Effects
<section class="maps">
<div class="pins um"></div>
<div class="pins dois"></div>
<div class="pins tres"></div>
<div class="pins quatro"></div>
<div class="pins cinco"></div>
</section>
var maps = $('.maps');
TweenMax.set(maps.find('.pins'), { css: { transform: 'scale(0)' } });
TweenMax.staggerTo(maps.find('.pins'), 0.5, {
css: { transform: 'scale(1)' },
ease: Expo.easeOut,
delay: 0.2
}, 0.1);
.maps{
width: 842px;
height: 336px;
background: url(http://maicolsantos.com/code/img/maps.png) no-repeat;
position: relative;
.pins{
position: absolute;
background: url(http://maicolsantos.com/code/img/pins.png);
width: 43px;
height: 140px;
}
.um{left: 60px;top: 10px;}
.dois{left: 170px;top: 120px;}
.tres{left: 350px;top: 60px;}
.quatro{right: 100px;top: 170px;}
.cinco{right: 190px;top: 30px;}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment