📜  在 css 代码示例中创建动画名称

📅  最后修改于: 2022-03-11 14:47:50.592000             🧑  作者: Mango

代码示例1
p /*this is the css name of the element you will apply the animation to*/ {
  animation-duration: 3s;
  animation-name: slidein; /*animation name ofcourse*/
}

@keyframes slidein /*the animation name goes here*/ {
  from {
    margin-left: 100%;
    width: 300%;
  }

  to {
    margin-left: 0%;
    width: 100%;
  }
}