有A,B两个p,如何实现A以B 为中心做rotate 呢?
我看transform-origin,只能以自己为参考点坐旋转
巴扎黑2017-04-17 11:54:28
I have a hunch that you will definitely fall into a trap in the future, because the effect you create with rotate is probably not what you actually want.
I suggest you read this article. What you want should be the effect mentioned in this article: http://m.open-open.com/m/lib/...
大家讲道理2017-04-17 11:54:28
Just change the current transform-origin position of A to the position of the center point of B. You can think of it as rotating with B as the center. If you take B away, it will still follow B The original position is centered and rotated
You can often just change your thinking. transform-origin is just the position and has nothing to do with other elements