Jump to content
Search Community

The rotating browser icon on the GreenSock homepage

johnnyno test
Moderator Tag

Go to solution Solved by PointC,

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hi and welcome to the GreenSock forums,

Thanks for posting the question here.


We have the entire homepage animation on CodePen: http://codepen.io/GreenSock/pen/KzwGgL?editors=0010


But I reduced it down to just the icons for you:

var iconTimeline = new TimelineMax({repeat:20}),
    icons = $("#browserIcons img"),

 for (i = 0; i < icons.length; i++) {
    iconTimeline.fromTo(icons[i], 0.6, {scaleX:0, opacity:0.4, z:0.1}, {autoAlpha:1, scaleX:1, ease:Power2.easeOut});
    iconTimeline.to(icons[i], 0.6, {scaleX:0, opacity:0.4, ease:Power2.easeIn});
    iconTimeline.set(icons[i], {visibility:"hidden"});

reduced demo: http://codepen.io/GreenSock/pen/KzwGgL?editors=0010


It's important to note that there is no 3D spinning. We are using a scaleX tween instead for widest browser support. The images grow out from center horizontally, shrink down to center, disappear and then the next one does the same. It all happens in that loop.

  • Like 2
Link to comment
Share on other sites

  • Solution

Hi i.am :)


Welcome to the forums.


It's actually five separate images. If you take a look at the reduced

See the Pen KzwGgL by GreenSock (@GreenSock) on CodePen

, you'll see the code for the images:

  <div id="browserIcons">
    <img src="//www.greensock.com/_img/browser-chrome-big.png" width="82" height="80" />
    <img src="//www.greensock.com/_img/browser-safari-big.png" width="77" height="86"  />
    <img src="//www.greensock.com/_img/browser-ie-big.png" width="82" height="74" />
    <img src="//www.greensock.com/_img/browser-firefox-big.png" width="82" height="83" />
    <img src="//www.greensock.com/_img/browser-opera-big.png" width="69" height="75" />

Happy tweening.


  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...