当前位置:首页 > 代码 > 正文

jquery文字滚动代码(jquery文字上下滚动)

admin 发布:2022-12-19 20:08 156


本篇文章给大家谈谈jquery文字滚动代码,以及jquery文字上下滚动对应的知识点,希望对各位有所帮助,不要忘了收藏本站喔。

本文目录一览:

jquery 实现文字左右滚动

html

head

script type="text/javascript" src="/jquery/jquery.js"/script

script type="text/javascript"

$(document).ready(function () {

$("#start").click(function () {

$("#box").animate({ right: "1500px" }, 4000);

});

});

/script

/head

body

pa href="#" id="start"Start Animation/a/p

div align="right" id="box" style="position:relative"

阿什顿饭卡上及地方了看见卡拉时间段福建按时到法律是快递费及卡拉是东方

/div

/body

/html

script src="你 JQ存放的地址 例如/include/123.js"/script

不知道是不是你要的

jquery实现文字向左循环滚动

根据你的代码 我改写了下 你看着弄吧。

!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ""

html xmlns=""

head

meta http-equiv="Content-Type" content="text/html; charset=utf-8" /

title向左滚动/title

style type="text/css"

*{

margin:0;

padding:0;

list-style:none;

}

#gundong {

background: #FFF;

overflow:hidden;

border: 1px dashed #CCC;

width: 500px;

font-size: 12px;

height: 20px;

line-height: 20px;

padding: 5px;

}

#gundong a {

color:#333;

}

#gundongAreaMain1 {

float: left;

width: 800%;

}

#gundongAreaMain2, #gundongAreaMain3, #gundongAreaMain2 li, #gundongAreaMain3 li {

float: left;

}

/style

/head

body

div id="gundongAreaMain"

span导读/span

div id="gundong"

div id="gundongAreaMain1"

ul id="gundongAreaMain2"

lia href="/" target="_blank"strong1111111111111111/strong/a/li

lia href="/" target="_blank"strong2222222222222222/strong/a/li

lia href="/" target="_blank"strong3333333333333333/strong/a/li

lia href="/" target="_blank"strong4444444444444444/strong/a/li

/ul

ul id="gundongAreaMain3"/ul

/div

/div

/div

script

!--

var speed=30; //数字越大速度越慢

var tab=document.getElementById("gundong");

var tab1=document.getElementById("gundongAreaMain2");

var tab2=document.getElementById("gundongAreaMain3");

tab2.innerHTML=tab1.innerHTML;

function Marquee(){

if(tab2.offsetWidth-tab.scrollLeft=0)

tab.scrollLeft-=tab1.offsetWidth

else{

tab.scrollLeft++;

}

}

var MyMar=setInterval(Marquee,speed);

tab.onmouseover=function() {clearInterval(MyMar)};

tab.onmouseout=function() {MyMar=setInterval(Marquee,speed)};

--

/script

/body

/html

javascript 或者 jQuery 实现 文字横向连续滚动

!DOCTYPE HTML

html

head

meta charset=UTF-8 /

titleNothing/title

style type="text/css"

/style

script

var create = function (x, y, text)

    {

    var marquee = document.createElement ('marquee');

    marquee.style.position = 'absolute';

    marquee.style.left = x + 'px';

    marquee.style.top = y + 'px';

    marquee.innerText = text;

    document.body.appendChild (marquee);

    }

    

    window.onload = function ()

    {

    create (100, 100, "Look boddy, U got work harder and put yourself to the JavaScript, once U learn the heart of the JavaScript, I can guarantee U win.");

    }

/script

/head

body

/body

/html

jquery文字滚动代码的介绍就聊到这里吧,感谢你花时间阅读本站内容,更多关于jquery文字上下滚动、jquery文字滚动代码的信息别忘了在本站进行查找喔。

版权说明:如非注明,本站文章均为 AH站长 原创,转载请注明出处和附带本文链接;

本文地址:http://ahzz.com.cn/post/22209.html


取消回复欢迎 发表评论:

分享到

温馨提示

下载成功了么?或者链接失效了?

联系我们反馈

立即下载