zoukankan      html  css  js  c++  java
  • h5实现照片墙效果

    <style>
    *{
    margin: 0;
    padding: 0;
    }
    body{
    background: url(images/bg.jpg);
    }
    #div1{
    100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 1;
    }
    #div1 div{
    position: absolute;
    -webkit-transition:1.5s all ease-in-out;
    -moz-transition:1.5s all ease-in-out;
    -ms-transition:1.5s all ease-in-out;
    -o-transition:1.5s all ease-in-out;
    border: 6px solid #FFF;
    box-shadow: 2px 2px 2px rgba(0,0,0,0.7);
    left:-300px;
    top:-300px;
    cursor: pointer;
    }
    #div1 div span{
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    100%;
    height: 100%;
    -webkit-transition:1.5s opacity ease-in-out;
    -moz-transition:1.5s opacity ease-in-out;
    -ms-transition:1.5s opacity ease-in-out;
    -o-transition:1.5s opacity ease-in-out;
    }
    #div1 .active{
    border:1px solid #FFF;
    box-shadow: 0 0 2px #000;
    }
    #prev,#next{
    position: absolute;
    60px;
    height: 60px;
    top: 50%;
    margin-top: -30px;
    border: 1px solid #999;
    box-shadow: 0 0 1px rgba(0,0,0,0.7);
    z-index: 2;
    -webkit-transition:0.7s all ease;opacity: 0.6;
    -moz-transition:0.7s all ease;opacity: 0.6;
    -ms-transition:0.7s all ease;opacity: 0.6;
    -o-transition:0.7s all ease;opacity: 0.6;
    }
    #prev{
    left: -20px;
    background: url(images/prev.png) center no-repeat #FFF;
    border-radius: 0 8px 8px 0;
    display: none;
    }
    #prev:hover{
    left: 0px;
    opacity: 1;
    }
    #next{
    right: -20px;
    background: url(images/next.png) center no-repeat #FFF;
    border-radius: 8px 0 0 8px;
    display: none;
    }
    #next:hover{
    right: 0px;
    opacity: 1;
    }
    .back{
    position: absolute;
    right: 20px;
    top:10px;
    color: #000;
    text-shadow:1px 1px 3px #999999;
    text-decoration: none;
    z-index: 10000
    }
    </style>

    <body>
    <a href="http://http://www.cnblogs.com/work-web/" target="_blank" class="back"></a>
    <a href="javascript:void(0)" id="prev"></a>
    <a href="javascript:void(0)" id="next"></a>
    <div id="div1"></div>
    </body>

  • 相关阅读:
    jQuery插件编写步骤详解
    原生JavaScript实现JSON合并(递归深度合并)
    js原型链继承及调用父类方法
    codefind.pl
    如何为属性是disabled的表单绑定js事件
    平假名、片假名转换
    #和##在宏替换中的作用
    Perl实用中文处理步骤(修改版)
    Perl Unicode全攻略
    nio DirectByteBuffer如何回收堆外内存
  • 原文地址:https://www.cnblogs.com/work-web/p/6130072.html
Copyright © 2011-2022 走看看