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/...
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
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/...
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