CSS transform origin issue on svg sub-element

后端 未结 1 1764
灰色年华
灰色年华 2020-12-04 04:03

I\'m having issues with the transform-origin while attempting to scale sub-elements.

While attempting to scale animate a box within a larger svg, it uses the transfo

1条回答
  •  情深已故
    2020-12-04 04:25

    You need transform-box: fill-box;

    @keyframes scaleBox {
      from {transform: scale(0);}
      to {transform: scale(1);}
      }
      #animated-box {
        transform-box: fill-box;
      	animation: scaleBox 2s infinite;
      }
    
        
        
        
        
        

    0 讨论(0)
提交回复
热议问题