Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

Transformation still swings out of canvas

Hi everyone,

When I preview my work, the icons still swing off from their original point (top left corner). I first changed the transform-origin: 50% 50%, but that also doesn't work. Could someone please help me with this?

/* --------------------------
  BASE 
--------------------------- */

body {
  padding-top: 5em;
}

svg {
  width: 33.32%;
  float: left;
}

.gear-icon, 
.hammer-icon, 
.heart-icon { 
  transform-origin:200px 50px; 
}

/* --------------------------
  GEAR
--------------------------- */
.gear-icon {
  transition: transform .4s ease-out;
}

.gear:hover,
.gear-icon {
  transform: rotate(45deg) scale(1.3);
}

/* --------------------------
  HAMMER
--------------------------- */

.hammer:hover,
.hammer-icon {
  transform: rotate(45deg);
}

.hammer-icon {
  transition: transform .3s ease-out;
}

/* --------------------------
  HEART
--------------------------- */

.heart:hover,
.heart-icon {
  transform: scale(1.3);
}

.heart-icon {
  transition: transform .2s ease-out;
}