jQuery无限滚动新闻插件tickerNews

所属分类:UI-滚动

 35048  328  查看评论 (3)
分享到微信朋友圈
X
jQuery无限滚动新闻插件tickerNews ie兼容8

使用方法

1、HTML

<div class="TickerNews" id="example">
  <div class="ti_wrapper">
    <div class="ti_slide">
      <div class="ti_content">
        <div class="ti_news"><a href="#">11:00 US fisherman rescued by tanker after 66 days lost at sea</a></div>
        <div class="ti_news"><a href="#">12:00 Overseas aid must rise by £1bn in next two years, says Europe</a></div>
        <div class="ti_news"><a href="#">13:00 Muslim population looks likely to double in size </a></div>
        <div class="ti_news"><a href="#">15:00 Heathrow cuts passenger levy to boost domestic flights</a></div>
        <div class="ti_news"><a href="#">16:00 Couple plotted to sell their new baby online for ?,000 </a></div>
      </div>
    </div>
  </div>
</div>

2、基本的CSS

.TickerNews {
  width: 100%;
  height: 50px;
  line-height: 50px;
}

.ti_wrapper {
  width: 100%;
  position: relative;
  overflow: hidden;
  height: 50px;
}

.ti_slide {
  width: 30000px;
  position: relative;
  left: 0;
  top: 0;
}

.ti_content {
  width: 8000px;
  position: relative;
  float: left;
}

.ti_news { float: left; }

3、引用jQuery和tickerNews JS

<script src="http://www.jq22.com/jquery/jquery-1.10.2.js"></script>
<script src="libs/jquery.tickerNews.min.js"></script>

4、激活news ticker

$("#example").newsTicker();

5、插件选项

$("#example").newsTicker({
	base: {
		width: 2100,
		time: 40000
	},
	itemWidth: "auto",
	ticker: ".ti_news",
	tickerColne: "ti_clone",
	wrapper: ".ti_wrapper",
	slide: ".ti_slide",
	content: ".ti_content",
	callbacks: {
		beforeLoad: function($Ticker) {},
		onLoad: function($current, $Ticker) {},
		function($old, $current) {},
		completeAnimation: function($old, $current) {}
	},
});
相关插件-滚动

jQuery元素滚动监听插件xRoll.js

xRoll.js 元素滚动监听插件 元素出现在窗口的时候在执行自定义的函数
  滚动
 23592  324

新闻向下翻滚更新

新闻向下翻滚更新
  滚动
 34775  431

向下滚动加载动画特效插件AOS

向下滚动网页加载动画特效插件AOS
  滚动
 36227  432

jQuery滚动楼层效果

jQuery滚动楼层效果,通俗简单好上手,js中有详细步骤解析。
  滚动
 37864  417

讨论这个项目(3)回答他人问题或分享插件使用方法奖励jQ币 评论用户自律公约

    万花丛中一点笑 0
    2018/5/4 10:57:45
    为啥不支持华为p10 plus啊?? 回复
    『深爱不及久伴』 0
    2017/5/12 10:03:50

    都没人评价,先来支持下

        彦军0
        2017/7/27 9:31:13
        不支持IE
    回复
😃
  • 😀
  • 😉
  • 😥
  • 😵
  • 😫
  • 😘
  • 😡
  • 👍
  • 🌹
  • 👏
  • 🍺
  • 🍉
  • 🌙
  • 💖
  • 💔
😃
  • 😀
  • 😉
  • 😥
  • 😵
  • 😫
  • 😘
  • 😡
  • 👍
  • 🌹
  • 👏
  • 🍺
  • 🍉
  • 🌙
  • 💖
  • 💔
取消回复