Webkit conversion: how to move along the Z axis, but not in the center?

Any idea how to make the rotation of the webkit translation rotate around a point other than the center of the element (e.g. around the top right corner)?

+3
source share
2 answers

You can use transform-origin to reposition the source:

.myClass{

    -webkit-animation-duration: 1s;

    -webkit-animation-name: myAnim;

    -webkit-animation-iteration-count: infinite;

    -webkit-transform-origin: 275px 150px;

    -webkit-animation-timing-function: linear;
}

You just need to use the rotation to see it in action now :)

Here is the official documentation: http://www.w3.org/TR/css3-3d-transforms/#transform-origin-property

+7
source

Is it possible to first move an object and then rotate it?

. , 3,5, -3, -5 , . .

0

Source: https://habr.com/ru/post/1780286/


All Articles