栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > Web开发 > Html/CSS > CSS教程

基于jQuery的公告无限循环滚动实现代码

CSS教程 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

基于jQuery的公告无限循环滚动实现代码

基于jQuery的公告无限循环滚动实现代码,效果如下,多用于pc端电商网站之中不断的循环更新的公告消息。

写一个简单的小demo:




	
		
		
		基于jQuery的公告无限循环滚动实现代码
		
			* {
				margin: 0;
				padding: 0;
			}
			
			li {
				list-style: none;
			}
			
			body {
				line-height: 1.5;
				font-size: 14px;
			}
			
			.scroll {
				display: inline-block;
				overflow: hidden;
				position: relative;
				height: 50px;
			}
			
			.scroll ul {
				transform: translateY(0);
			}
			
			.animate {
				-webkit-transition: all .3s ease-out;
			}
			
			.scroll li {
				overflow: hidden;
				display: -webkit-box;
				margin-left: 10px;
				width: 90%;
				height: 50px;
				line-height: 30px;
				color: #333;
				text-overflow: ellipsis;
				-webkit-line-clamp: 1;
				-webkit-box-orient: vertical;
				white-space: normal;
			}
			
			.scroll li  img{
				margin-top: 20px;
				margin-right: 12px;
				width: 12px;
				height: 12px;
				
			}
		

	

	
		
			
  • 前端妹子是我吗
  • 对呀,我就是前端妹子啊
  • 哈哈哈你是谁呀
  • 你猜猜我是哪个

热门推荐:全栈工程师开发常用插件、工具类库,视频,资料300G资源汇总

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/242608.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号