zoukankan      html  css  js  c++  java
  • h5-transform二维变换-扑克牌小案例

    html代码:6张扑克牌

    1 <div class="pkBox">
    2     <img src="../img/pk1.jpg" alt="">
    3     <img src="../img/pk2.jpg" alt="">
    4     <img src="../img/pk3.jpg" alt="">
    5     <img src="../img/pk4.jpg" alt="">
    6     <img src="../img/pk5.jpg" alt="">
    7     <img src="../img/puke.jpg" alt="">
    8 </div>

    css代码

     1     <style>
     2         .pkBox{
     3             width: 250px;
     4             height: 344px;
     5             position: relative;
     6             margin: 300px auto;
     7         }
     8         .pkBox > img{
     9             width: 100%;
    10             height: 100%;
    11             position: absolute;
    12             left: 0;
    13             top: 0;
    14             transition: transform 1s;
    15             transform-origin: right top;
    16         }
    17         .pkBox:hover >img:nth-of-type(1){
    18             transform: rotate(60deg);
    19         }
    20         .pkBox:hover >img:nth-of-type(2){
    21             transform: rotate(120deg);
    22         }
    23         .pkBox:hover >img:nth-of-type(3){
    24             transform: rotate(180deg);
    25         }
    26         .pkBox:hover >img:nth-of-type(4){
    27             transform: rotate(240deg);
    28         }
    29         .pkBox:hover >img:nth-of-type(5){
    30             transform: rotate(300deg);
    31         }
    32         .pkBox:hover >img:nth-of-type(6){
    33             transform: rotate(360deg);
    34         }
    35 
    36     </style>
  • 相关阅读:
    CIL中间语言浅谈
    keepalived实现nginx高可用
    centos 开启关闭网卡
    CentOS7下安装httpd服务
    freeswitch socket连接报错
    centos安装nodejs
    CronTrigger
    mysql 表增加索引
    FreeSWITCH呼叫参数之sip_cid_type
    中继网关开启呼入
  • 原文地址:https://www.cnblogs.com/FengBrother/p/11390452.html
Copyright © 2011-2022 走看看