jQuery无限滚动新闻插件tickerNews

所属分类:UI-滚动

 35059  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) {}
	},
});
相关插件-滚动

jQueryScrollPage单页全屏滚动效果

漂亮的jQuery单页全屏滚动,带视差效果
  滚动
 34634  392

jquery无缝滚动

真正的无缝滚动
  滚动
 74227  524

jQuery仿京东楼层滑动侧边栏高亮(原创)

jQuery模仿京东侧边栏点击滑动到该楼层,同时侧边栏随着页面滚动对应导航高亮。
  滚动
 37862  408

jQuery.nicescroll美化滚动条

自定义scroll的样式,可配置
  滚动
 91732  503

讨论这个项目(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
    回复
😃
  • 😀
  • 😉
  • 😥
  • 😵
  • 😫
  • 😘
  • 😡
  • 👍
  • 🌹
  • 👏
  • 🍺
  • 🍉
  • 🌙
  • 💖
  • 💔
😃
  • 😀
  • 😉
  • 😥
  • 😵
  • 😫
  • 😘
  • 😡
  • 👍
  • 🌹
  • 👏
  • 🍺
  • 🍉
  • 🌙
  • 💖
  • 💔
取消回复