如何使用材质UI将动画添加到文本

时间:2020-03-25 04:21:03

标签: css material-ui

我正在尝试添加动画,我希望添加的文本具有3d效果,并使用材质ui同时旋转360度

<Typography variant="overline"  color="secondary"  style={{fontFamily:'Roboto'}}>
  All about your needs
</Typography>

我希望上述文字具有这种效果,该如何解决这个问题?

1 个答案:

答案 0 :(得分:1)

这是CSS行为,请查看以下内容:

@keyframes rotatee {
  from{transform:rotateY(0deg)}

    to {transform:rotateY(360deg)}
  
}

.toto > span {
    animation: rotatee 3s linear infinite;
  display:inline-block;
}
<span class="toto">
  <span>TEXT</span>
</span>