css3 里外转 动画

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<style>
  div {
    width: 200px;
    height: 200px;
    background: aqua;
    animation: turn 50s linear infinite;
    position: fixed;
    left: 40vw;
    top: 30vh;
  }
  @keyframes turn {
    0% {
      transform: rotateX(0deg) rotateY(0deg);
    }
    50% {
      transform: rotateX(90deg) rotateY(190deg);
    }
    100% {
      transform: rotateX(180deg) rotateY(360deg);
    }
  }
</style>
<body>
  <div></div>
</body>
</html>

 

posted @ 2021-04-07 10:03  王希有  阅读(124)  评论(0编辑  收藏  举报