热门关键字:
jquery > jquery教程 > jquery教程 > css3实现顺时针旋转

css3实现顺时针旋转

413
作者:管理员
发布时间:2021/8/20 18:22:09
评论数:0
转载请自觉注明原文:http://www.jq-school.com/Show.aspx?id=5294
  我有一个这样定义的HTML元素:CSS3 - 顺时针旋转比逆时针


  Toggle


  function toggle(eid) {


  var el=document.getElementById(eid);


  if (el) {


  el.className +=el.className ? 'rotate-clockwise' : 'rotate-counter-clockwise';


  }


  }


  然后我已经定义是这样我的CSS:


  。rotated {


  transform: rotate(90deg);


  }


  @keyframes rotateClockwise { from { ? } to { ? } }


  。rotate-clockwise {


  animation rotateClockwise 0.1s linear;


  }


  @keyframes rotateCounterClockwise { from { ? } to { ? } }


  。rotate-counter-clockwise {


  animation rotateCounterClockwise 0.1s linear;


  }




如果您觉得本文的内容对您的学习有所帮助:支付鼓励



关键字:jquery
友荐云推荐