CSS3+jQuery仿IOS股市无缝滚动

版权:原创 更新时间:1年以上
[该文章底部包含文件资源,可根据自己情况,决定是否下载资源使用,时间>金钱,如有需要,立即查看资源]

以下是 CSS3+jQuery仿IOS股市无缝滚动 的示例演示效果:

当前平台(PC电脑)
  • 平台:

部分效果截图:

CSS3+jQuery仿IOS股市无缝滚动

HTML代码(index.html):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <link rel="stylesheet" href="rolling.css" type="text/css" />
    <title>stock</title>
</head>
<body>
    <div id="search">
        <img src="images/magnifier.png" />
        <input type="text" />
    </div>
    <div id="demoLeft">
        <div class="indemo">
            <div id="demo1" class="demo">
                <div class="block">
                    <div class="info">APPL 405.0</div>
                    <div class="subinfo">VALUE: 176B</div>
                    <div class="pointer up">0.12</div>
                    <div class="clear"></div>
                </div>

                <div class="block">
                    <div class="info">GOOG 205.0</div>
                    <div class="subinfo">VALUE: 376B</div>
                    <div class="pointer down">0.32</div>
                    <div class="clear"></div>
                </div>
                <div class="block">
                    <div class="info">HOOH 120.0</div>
                    <div class="subinfo">VALUE: 86B</div>
                    <div class="pointer down">0.55</div>
                    <div class="clear"></div>
                </div>

                <div class="block">
                    <div class="info">TNT 405.0</div>
                    <div class="subinfo">VALUE: 276B</div>
                    <div class="pointer up">0.34</div>
                    <div class="clear"></div>
                </div>

            </div>
            <div id="demo2" class="demo"></div>
        </div>
    </div>
    <div class="buttonSet">
        <div class="button red">UP</div>
        <div class="button green">DOWN</div>
    </div>
</body>
</html>
<script type="text/javascript" src="rolling.js"></script>












JS代码(rolling.js):

var speed=40var tabLeft=document.getElementById("demoLeft");
	var tab1=document.getElementById("demo1");
	var tab2=document.getElementById("demo2");
	tab2.innerHTML=tab1.innerHTML;
	function Marquee1(){
	if(tabLeft.scrollLeft>=tab2.offsetWidth)tabLeft.scrollLeft-=tab1.offsetWidthelse{
	tabLeft.scrollLeft+=4;
}
}
var MyMar=setInterval(Marquee1,speed);
	tabLeft.onmouseover=function(){
	clearInterval(MyMar)}
;
	tabLeft.onmouseout=function(){
	MyMar=setInterval(Marquee1,speed)}
;
	

CSS代码(rolling.css):

*{margin:0;padding:0;}
body{background:url(images/metal.jpg) top center;}
.clear{clear:both;}
#search{background:#000;background:rgba(0,0,0,0.7);width:500px;height:60px;margin:30px auto;margin-top:50px;border-radius:100px;overflow:hidden;}
#search img{float:left;width:100px;height:100px;margin:-20px;}
#search input{background:none;border:none;float:left;width:80%;height:40px;margin:10px auto;line-height:40px;color:#FFF;font:24px Tahoma,Geneva,sans-serif;outline:none;}
#demoLeft{overflow:hidden;width:600px;height:120px;margin:20px auto 0;box-shadow:inset 0 4px 4px 2px #000;}
#demoLeft .indemo{background:rgba(0,0,0,0.7);background:url(images/opacity_70.png);float:left;width:500%;}
.demo{float:left;}
.block{float:left;width:200px;height:100px;margin:20px 30px;color:#FFF;text-shadow:2px 4px 2px #000;cursor:pointer;}
.info{float:left;width:200px;height:40px;font:bold 28px "΢���ź�";line-height:40px;}
.subinfo{float:left;width:120px;height:40px;font:bold 16px "΢���ź�";line-height:40px;}
.pointer{float:left;width:80px;height:40px;text-align:right;font:bold 16px "΢���ź�";line-height:40px;}
.up{background:url(images/up.png) no-repeat;}
.down{background:url(images/down.png) no-repeat;}
.buttonSet{width:430px;height:120px;margin:30px auto 0;}
.button{float:left;margin:20px;width:170px;height:68px;border:none;outline:none;cursor:pointer;color:#FFF;font:bold 24px Verdana,Geneva,sans-serif;text-align:center;line-height:68px;}
.red{background:url(images/1.png) no-repeat;}
.green{background:url(images/2.png) no-repeat;}
.red:active{background-position:0 -68px;line-height:70px;}
.green:active{background-position:0 -68px;line-height:70px;}
.calendar{width:450px;height:78px;margin:0 auto;}
.card{background:url(images/BackgroundHistoryNum@2x.png);float:left;width:52px;height:78px;font:bold 40px Arial,Helvetica,sans-serif;line-height:78px;color:#062F41;text-align:center;text-shadow:2px 2px 2px #FFF;}
.card:hover{}
附件:下载该文件资源,减少时间成本(增值服务)
留言
该资源可下载
File Source
.rar
94.88 KB
Html CSS3特效
最新结算
jquery虚拟键盘中文打字效果js代码
类型: .rar 金额: CNY 2.31¥ 状态: 待结算 详细>
jquery虚拟键盘中文打字效果js代码
类型: .rar 金额: CNY 0.29¥ 状态: 待结算 详细>
HTML5实现CSS滤镜图片切换特效代码
类型: .rar 金额: CNY 2.31¥ 状态: 待结算 详细>
jQuery头像裁剪插件cropbox js代码
类型: .rar 金额: CNY 0.29¥ 状态: 待结算 详细>
jQuery头像裁剪插件cropbox js代码
类型: .rar 金额: CNY 2.31¥ 状态: 待结算 详细>
CSS3制作3D图片立方体旋转特效
类型: .rar 金额: CNY 2.31¥ 状态: 待结算 详细>
CSS3制作3D图片立方体旋转特效
类型: .rar 金额: CNY 0.29¥ 状态: 待结算 详细>
CSS3制作3D图片立方体旋转特效
类型: .rar 金额: CNY 2.31¥ 状态: 待结算 详细>
CSS3制作3D图片立方体旋转特效
类型: .rar 金额: CNY 0.29¥ 状态: 待结算 详细>
jQuery+css3实现信封效果
类型: .rar 金额: CNY 0.29¥ 状态: 待结算 详细>
我们力求给您提供有用的文章,再此基础上,会附加营收资源,不做任何广告,让平台可以更好发展 若您发现您的权利被侵害,或使用了您的版权,请发邮件联系 sunlifel@foxmail.com ggbig觉得 : 不提供源码的文章不是好文章
合作伙伴
联系我们
  • QQ:21499807
  • 邮箱:sunlifel@foxmail.com
  • QQ扫一扫加QQ
    QQ扫一扫
Copyright 2023-2024 ggbig.com·皖ICP备2023004211号-1
打赏文章