• 实现照片墙的效果


    https://github.com/shiralwz/image-page

    今天在github上传了一个小的照片墙的页码源代码,主要是照片墙的功能,当鼠标移动到哪个照片的时候,照片自动放大并上浮。

    <!DOCTYPE html>
    <html>
      <head lang="en">
        <meta charset="utf-8">
        <title>照片墙</title>
        <link type="text/css" href="style.css" rel="stylesheet">
    
      </head>
      <body>
        <div class="container">
          <img class="pic pic1" src="image/1.jpg">
          <img class="pic pic2" src="image/2.jpg">
          <img class="pic pic3" src="image/3.jpg">
          <img class="pic pic4" src="image/4.jpg">
          <img class="pic pic5" src="image/5.jpg">
        <div>
      </body>
    </html>
    *{
      margin: 0;
      padding: 0;
    }
    
    body{
      background-color: #cccccc;
    }
    
    .container{
      width: 960px;
      height: 450px;
      margin: 60px auto;
      position: relative;
    }
    
    .pic{
      width: 230px;
    }
    
    .container img:hover{
      box-shadow: 15px 15px 20px rgba(50,50,50,0.4);
      transform: rotate(0deg) scale(1.20);
      -webkit-transform: rotate(0deg) scale(1.20);
      z-index: 2;
    }
    
    .container img{
      padding: 10px 10px 15px;
      background: white;
      border: 1px solid #ddd;
      box-shadow: 2px 2px 3px rgba(50,50,50,0.4)
      -webkit-transition: all 0.5s ease-in;
      -moz-transition: all 0.5s ease-in;
      -ms-transition: all 0.5s ease-in;
      -o-transition: all 0.5s ease-in;
      transition: all 0.5s ease-in;
      position: absolute;
      z-index: 1;
    }
    
    .pic1{
      left: 0px;
      top: 0;
      transform: rotate(-5deg);
      -webkit-transform: rotate(-5deg);
    }
    
    .pic2{
      left: 400px;
      top: 0;
      transform: rotate(-15deg);
      -webkit-transform: rotate(-15deg);
    }
    
    .pic3{
      bottom: 0px;
      right: 10px;
      transform: rotate(5deg);
      -webkit-transform: rotate(5deg);
    }
    
    .pic4{
      bottom: 0px;
      left: 30px;
      transform: rotate(-10deg);
      -webkit-transform: rotate(-10deg);
    }
    
    .pic5{
      left: 350px;
      top: 300px;
      transform: rotate(-10deg);
      -webkit-transform: rotate(-10deg);
    }

     

  • 相关阅读:
    mac下webstorm自动编译typescript配置
    [转]Golang 中使用 JSON 的小技巧
    Element-UI 框架 el-scrollbar 组件
    npm读取config配置的优先级(yarn同理)
    win, mac, linux 默认系统缓存目录
    yum离线安装rpm包
    常见网络摄像机(摄像头)的端口及RTSP地址
    sed命令在mac和linux下的区别
    canvas笔记备忘
    shell脚本:批量修改文件名(添加/删除文件名中字符)
  • 原文地址:https://www.cnblogs.com/iwangzheng/p/4844643.html
Copyright © 2020-2023  润新知