1

html代码:

<div class="box">
  <div class="div">1</div>
</div>

 css代码:

div{
            width: 200px;
            height: 200px;
            margin: 0 auto;
        }
        .box{
            margin-top: 100px;
            transform:perspective(500px);
            transform-style:preserve-3d;
            position: relative;
            border:1px solid #fff;               
        }
        .box div{
            background-color: #ff0000;
            position: absolute;
            font-size: 80px;
            line-height: 200px;
            text-align: center;
            top: 0;
            left: 0;
            animation:ms 2000ms infinite;
        }
        @keyframes ms{
            from{transform:rotatey(0deg)}
            to{transform:rotatey(360deg)}
            
        }