首页 > 编程知识 正文

图片怎么旋转30度,echarts环形图百分比

时间:2023-05-06 21:01:49 阅读:16469 作者:4296

使用要点: animation、transform、transform-origin、摆动位置统一后,实现同角度摆动。

代码实现:

#box{

width:300px;

height:300px;

border :1 pxsolidrgba (0,140,255,0.623 );

position: relative;

}

. center-circle{

width:20px;

height:20px;

背景色: RGB (216、166、28;

border-radius: 10px;

位置: absolute;

top:0;

left:0;

bottom: 0;

right: 0;

margin :自动;

}

. plate-circle{

width:48px;

height:48px;

border-radius: 50%;

背景色: RGB (216、166、28;

位置: absolute;

top:276px;

left:126px;

animation : pendulum-animation4slinearinfinite;

/*

变换-定向更改已转换元素的位置。 默认值为50% 50% 0

使摆锤旋转位置与中心圈的中心一致

*/

transform-origin: 50% -127px;

}

. connecting-line{

width:4px;

height:150px;

背景色: RGB (216、166、28;

位置: absolute;

top: 50%;

left: 148px;

animation : pendulum-animation4slinearinfinite;

/*使拼盘的切换位置与center-circle的中心一致*

变换- Origin : 50 % 0;

}

@keyframes pendulum-animation{

0 % { transform 3360旋转(0deg ); }

25 % { transform 3360 rotate (-30度) }

50 % { transform 3360旋转(0deg ); }

75 % { transform 3360 rotate (30度); }

100 % { transform 3360旋转(0deg ); }

}

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。