如何用html5实现翻书的动画效果

<!DOCTYPE html>
<html>
 <head>
  <meta charset="UTF-8">
  <title></title>
  <style type="text/css">
  *{
                                     margin:0;
                                      padding:0;
                                      } 
  ul{
                                    list-style:none;
                                    }
                                  .text{
                                      width:150px;
                                      height:220px;
                                        margin:200px;
                                       position:relative;
                                        perspective:500px;
                                       transform-style:preserve-3d;
                                   }
                                    .text  li{
                                          width:100%;
                                          height:100%;
                                            position:absolute;
                                          left:0;
                                           top:0;
                                           background:liner-gradient(to  right,white,pink);
                                            border:1px  solid  lightgray;
                                             border-radius:0  5px  5px  0;
                                          transform-origin:left;
                                           transition:5s;
                                             box-shadow:0  5px  5px  lightgray;
                                               background-color:#FF99CC;
 
                                      }
                                    .text  li:nth-of-type(1){
                                        transform:rotateY(-28deg);
                                     }
                                         .text  li:nth-of-type(2){
                                        transform:rotateY(-26deg);
                                     }
                                       .text  li:nth-of-type(3){
                                        transform:rotateY(-24deg);
                                     }
                                       .text  li:nth-of-type(4){
                                        transform:rotateY(-22deg);
                                     }
                                       .text  li:nth-of-type(5){
                                        transform:rotateY(-20deg);
                                     }
                                       .text:hover  li:nth-of-type(1){
                                                    transform:rotateY(-160deg);
                                                    transition:1s;
                                     }
                                         .text:hover  li:nth-of-type(2){
                                                    transform:rotateY(-150deg);
                                                    transition:1.3s;
                                     }
                                       .text:hover  li:nth-of-type(3){
                                                    transform:rotateY(-140deg);
                                                    transition:1.6s;
                                     }
                                       .text:hover  li:nth-of-type(4){
                                                    transform:rotateY(-130deg);
                                                    transition:1.9s;
                                   }           
  </style>
 </head>
 <ul   class="text">
                       <li></li>   
                        <li></li>
                       <li></li>
                        <li></li>
                         <li  style="line-height:220px;">Web前端开发技术</li>
                    </ul>
  
 <body>
 </body>
</html>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值