what does translate do in css code example

Example 1: css trasnalte

/* Single <length-percentage> values */
transform: translate(200px);
transform: translate(50%);

/* Double <length-percentage> values */
transform: translate(100px, 200px);
transform: translate(100px, 50%);
transform: translate(30%, 200px);
transform: translate(30%, 50%);

Example 2: translate css property

div {
  width: 60px;
  height: 60px;
  background-color: skyblue;
}

.moved {
  transform: translate(50px, 10px);
  background-color: pink;
}

Example 3: scale css

scale=For a two dimentional animation

Example 4: css scale

scale(sx)

scale(sx, sy)

Tags:

Css Example