• jquery图片翻转


    Boss看见人家的网站的图片是那种反转效果的,就叫我也做一个,真无奈,那是flash啊,我哪会。。。
    幸亏有jquery,要不我还真弄不出来 。。。(先记下来,省得以后忘了,很简单的。。。)
    <script type="text/javascript" src="jquery.js"></script>
    <script language="JavaScript" type="text/javascript">

    $(document).ready(function(){
          setInterval('autoimgs(".olddm img")',3000);
          autoimg();
    });

    function autoimg(){
        $(".olddm img").hover(function(){aaa(this)},function(){bbb(this)}); 
         var aaa = function(obj){
         autoimgs(obj)
        }
      var bbb = function(obj){  
       }   
    }
    function autoimgs(obj){
     $(obj).animate({"0"},{queue:true,duration:800})
        .animate({"135px"},{queue:true,duration:800})
    }
    </script>

    <style type="text/css">
     *{
      margin:auto;
      font-size:12px;
     }
    </style>

    </head>
    <body>
    <div align="center" style=" 506px; height:249px; margin:auto;">
     <div class="olddm" align="center" style="160px; height:214px; margin:auto; margin-top:33px; margin-left:5px; float:left;">
           <div style=" 135px; height:176px;"><img src="1.gif" width="135" height="176" /></div>
            <div>2</div>
            <div align="center"><a href="/show/?id=14" target="_blank">09年8月直投刊</a></div>
      </div>
        <div class="olddm" align="center" style="160px; height:214px; margin:auto; margin-top:33px; margin-left:5px; float:left;">
            <div style=" 135px; height:176px;"><img src="2.gif" width="135" height="176" /></div>
            <div>2</div>
            <div align="center"><a href="/show/?id=14" target="_blank">09年8月直投刊</a></div>
        </div>
        <div class="olddm" align="center" style="160px; height:214px; margin:auto; margin-top:33px; margin-left:5px; float:left;">
         <div style=" 135px; height:176px;"><img src="3.jpg" width="135" height="176" /></div>
            <div>2</div>
            <div align="center"><a href="/show/?id=14" target="_blank">09年8月直投刊</a></div>
        </div>
    </div>

    只要是img的就ok了,上面的我没删。

  • 相关阅读:
    英语长难句
    服务器部署 halo博客项目
    11月迟来的总结
    10月总结
    9月总结
    python根据字符串导入模块
    RestFul(番外):类视图更适合restful
    Django-基础 Meta自定义
    (垃圾代码)修改同目录下面的xml文件标签数值
    Django-templatetags设置(在templates中使用自定义变量)
  • 原文地址:https://www.cnblogs.com/pipizhu/p/1576366.html
Copyright © 2020-2023  润新知