zoukankan      html  css  js  c++  java
  • 图片旋转

     1 <html lang="en">
     2 
     3 <head>
     4     <meta charset="UTF-8">
     5     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     6     <meta http-equiv="X-UA-Compatible" content="ie=edge">
     7     <title></title>
     8     <style>
     9         section {
    10             width: 120px;
    11             height: 163px;
    12             margin: 200px auto;
    13             /* background-color: aqua; */
    14             position: relative;
    15         }
    16         
    17         section img {
    18             width: 100%;
    19             height: 100%;
    20             position: absolute;
    21             left: 0;
    22             top: 0;
    23             transition: all 1s linear;
    24             transform-origin: left bottom;
    25         }
    26         /* section img:hover  {
    27             transform: rotate(15deg)
    28         } */
    29         
    30         section:hover img:nth-child(1) {
    31             transform: rotate(30deg)
    32         }
    33         
    34         section:hover img:nth-child(2) {
    35             transform: rotate(60deg)
    36         }
    37         
    38         section:hover img:nth-child(3) {
    39             transform: rotate(90deg)
    40         }
    41         
    42         section:hover img:nth-child(4) {
    43             transform: rotate(120deg)
    44         }
    45         
    46         section:hover img:nth-child(5) {
    47             transform: rotate(150deg)
    48         }
    49     </style>
    50 </head>
    51 
    52 <body>
    53     <section>
    54         <img src="images/1.jpg" alt="">
    55         <img src="images/2.jpg" alt="">
    56         <img src="images/3.jpg" alt="">
    57         <img src="images/4.jpg" alt="">
    58         <img src="images/5.jpg" alt="">
    59 
    60     </section>
    61 </body>
    62 
    63 </html>

  • 相关阅读:
    摘:复习STL
    C#:在其它dll中调用此文件中的资源
    摘录:CSharp调用C动态链接库详解
    C/C++基本数据类型
    mysqlreport指南
    mysqlreport工具
    收藏一个简洁的PHP可逆加密函数
    解决MySQL查询数据不一致诟病
    Ubuntu下搭建C/C++开发环境
    mysql:主键和索引的区别
  • 原文地址:https://www.cnblogs.com/yuanxiangguang/p/11322842.html
Copyright © 2011-2022 走看看