<div class="box" id="box1"></div>
<div class="box" id="box2"></div>
body {
  background-color:#1d1d1d;
}

.box {
  width:50px;
  height:50px;
  position:relative;
  border-radius:6px;
  margin-top:4px;
  display:inline-block;
  background-color:#6fb936;
}




//the following two lines produce identical results; we recommend the second because of the ease of use
gsap.to("#box1", {duration: 2, css: {top: 70, backgroundColor: "#FF0000"}});
gsap.to("#box2", {duration: 2, top: 70, backgroundColor: "#FF0000"});

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://s3-us-west-2.amazonaws.com/s.cdpn.io/16327/gsap-latest-beta.min.js