zoukankan      html  css  js  c++  java
  • 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了,上面的我没删。

  • 相关阅读:
    数据挖掘面试题之梯度提升树
    Python3入门机器学习
    深度学习之神经网络核心原理与算法-caffe&keras框架图片分类
    Python爬虫框架Scrapy学习笔记原创
    用python实现数字图片识别神经网络--启动网络的自我训练流程,展示网络数字图片识别效果
    Springboot-data-jpa增删改查
    初始SpringBoot
    Spring与MyBatis整合
    Dubbbo
    Zookeeper分布式锁
  • 原文地址:https://www.cnblogs.com/pipizhu/p/1576366.html
Copyright © 2011-2022 走看看