• 带同时滚动小色条的banner轮播图jq


    <div class="baoliao tongcheng">
    <p class="headline1">同城<font>活动&gt;&gt;</font></p>
    <ul class="tongchengul">
    <li>
    <div class="libox">
    <div class="imgboxoo">
    <a href="#">
    <img src="img/143686314955a4caad6a0ab.jpg">
    </a>
    </div>
    <div class="textboxoo">
    <h4><a href="#">1顺势而为!共享史上最大财富盛宴</a></h4>
    <p>2015-12-23 15:52<a href="#">参与活动</a></p>
    <p class="zhuzhi">山东济南市高新区舜泰广场<span><font>18</font> 报名</span></p>
    </div>
    </div>
    </li>
    <li>
    <div class="libox">
    <div class="imgboxoo">
    <a href="#">
    <img src="img/143686314955a4caad6a0ab.jpg">
    </a>
    </div>
    <div class="textboxoo">
    <h4><a href="#">2顺势而为!共享史上最大财富盛宴</a></h4>
    <p>2015-12-23 15:52<a href="#">参与活动</a></p>
    <p class="zhuzhi">山东济南市高新区舜泰广场<span><font>18</font> 报名</span></p>
    </div>
    </div>
    </li>
    <li> <div class="libox"> <div class="imgboxoo"> <a href="#"> <img src="img/143686314955a4caad6a0ab.jpg"> </a> </div> <div class="textboxoo"> <h4><a href="#">3顺势而为!共享史上最大财富盛宴</a></h4> <p>2015-12-23 15:52<a href="#">参与活动</a></p> <p class="zhuzhi">山东济南市高新区舜泰广场<span><font>18</font> 报名</span></p> </div> </div> </li> <li> <div class="libox"> <div class="imgboxoo"> <a href="#"> <img src="img/143686314955a4caad6a0ab.jpg"> </a> </div> <div class="textboxoo"> <h4><a href="#">4顺势而为!共享史上最大财富盛宴</a></h4> <p>2015-12-23 15:52<a href="#">参与活动</a></p> <p class="zhuzhi">山东济南市高新区舜泰广场<span><font>18</font> 报名</span></p> </div> </div> </li> <li> <div class="libox"> <div class="imgboxoo"> <a href="#"> <img src="img/143686314955a4caad6a0ab.jpg"> </a> </div> <div class="textboxoo"> <h4><a href="#">5顺势而为!共享史上最大财富盛宴</a></h4> <p>2015-12-23 15:52<a href="#">参与活动</a></p> <p class="zhuzhi">山东济南市高新区舜泰广场<span><font>18</font> 报名</span></p> </div> </div> </li> <div class="clear"></div> </ul> <div class="gudongtiao"> <ul class="icongun"> <li class="gudongli"></li> <li></li> <li></li> <li></li> <li></li> <div class="clear"></div> </ul> </div></div>

    <script>
    $(function(){
    var width = $('.tongcheng .headline1').width();
    var ulwidth = width*5;
    $('.tongcheng').width(width);
    $('.tongchengul li').width(width);
    $('.tongchengul').width(ulwidth);
    var t = setInterval('lunbo()',2000);
    });
    function lunbo(){
    if(!$('.tongchengul').is(":animated")){
    var width = $('.tongcheng .headline1').width();
    var length = $('.tongchengul li').length;
    var ulwidth = width*length;
    var marginleft = parseInt($('.tongchengul').css('margin-left'));
    var maxmarginleft = (parseInt(ulwidth/width)-1)*width;
    if(marginleft<= -maxmarginleft){
    $('.tongchengul').css('margin-left',-width);
    $('.tongchengul').animate({marginLeft:'0px'},300,function(){
    $('.icongun li').siblings().removeClass('gudongli');
    $('.icongun li:eq(0)').addClass('gudongli');
    });

    }else{
    $('.tongchengul').animate({marginLeft:marginleft-width+'px'},300,function(){
    var num = Math.abs(marginleft/width-1);
    $('.icongun li').siblings().removeClass('gudongli');
    $('.icongun li:eq('+num+')').addClass('gudongli');

    });
    }
    }
    }
    </script>
  • 相关阅读:
    MapInfo 文件格式说明
    一个经典编程面试题的“隐退”
    Polar 投影c#版本移植
    关于 tf.nn.softmax_cross_entropy_with_logits 及 tf.clip_by_value
    系列解读Dropout
    python删除所有的中文字符、非ASCII或非英文字符,检查字符串是否包含非ASCII
    Python使用split使用多个字符分隔字符串
    Convolutional Neural Networks for Visual Recognition
    【TensorFlow】tf.nn.conv2d是怎样实现卷积的?
    [TensorFlow] tf.nn.softmax_cross_entropy_with_logits的用法
  • 原文地址:https://www.cnblogs.com/mm2015/p/5076698.html
Copyright © 2020-2023  润新知