📜  上下滑动动画css代码示例

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

代码示例1
.my-div{
  background-color: #f00;
  animation: animationname 2s linear infinite;
  /*animation: animation-name animation-duration animation-direction animation-iteration-count */  
  transition: .5s ease-in-out;
}
@keyframes animationname{
  0%{
    transform: translateX(10px);
  }
  100%{
    transform: translateX(-10px);
  }