how to keep text orientation unchanged during rotation in SVG

后端 未结 2 1251
悲&欢浪女
悲&欢浪女 2020-12-07 02:45

I am using in svg to roate som circles and texts around a point at the same time, however, I want to k

2条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-07 03:12

    Pure SVG

    1. Rotate the entire group of elements: triangle, spiral and colored circles with the letters
    
     ....
     
       
    
    1. Inside is the second animation of the rotation of circles and letters.
     
    
    1. We find the coordinates of the center of rotation of the letters using the getBBox () JS method
     
    

    The animation will start after clicking

    text {
      font-family:sans-serif;
      font-size:14px;
      font-weight:bold;
      fill:#6E6E6E;
      }
    
      
      
      
      
         
        
       
       
              
        
          
        
        
        
            
              A  
             
               
              
        
        
        
        
            B
         
            
            
       
      
      
        
        C
       
           
            
        
         
        
          
          
     
     

    Example with adding animation of the ball movement in a spiral

    text {
      font-family:sans-serif;
      font-size:14px;
      font-weight:bold;
      fill:#6E6E6E;
      }
    
      
      
      
      
         
        
       
           
       
          
        
              
        
           
         
         
        
           
        
          
         
           
           
        
         
           
        
        
        
             A   
              
        
        
        
        
            B
         
            
       
      
      
         C
     
           
            
        
         
        
          
          
    

提交回复
热议问题