html

創(chuàng)新互聯(lián)自2013年起,是專業(yè)互聯(lián)網(wǎng)技術(shù)服務(wù)公司,擁有項(xiàng)目做網(wǎng)站、成都網(wǎng)站建設(shè)網(wǎng)站策劃,項(xiàng)目實(shí)施與項(xiàng)目整合能力。我們以讓每一個(gè)夢(mèng)想脫穎而出為使命,1280元猇亭做網(wǎng)站,已為上家服務(wù),為猇亭各地企業(yè)和個(gè)人服務(wù),聯(lián)系電話:13518219792
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"
阿什頓飯卡上及地方了看見(jiàn)卡拉時(shí)間段福建按時(shí)到法律是快遞費(fèi)及卡拉是東方
/div
/body
/html
script src="你 JQ存放的地址 例如/include/123.js"/script
不知道是不是你要的
!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
根據(jù)你的代碼 我改寫了下 你看著弄吧。
!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向左滾動(dòng)/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導(dǎo)讀/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; //數(shù)字越大速度越慢
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
(摘自博客園,原網(wǎng)址)
jquery.nicescroll.min.js滾動(dòng)條使用方法,Nicescroll是制作自定義滾動(dòng)條的jq插件。支持div,iframe,html等使用,兼容IE7-8,safari,firefox,webkit內(nèi)核瀏覽器(chrome,safari)以及智能終端設(shè)備瀏覽器的滾動(dòng)條。
頁(yè)面使用:
$("html").niceScroll({
cursorcolor:"#E62020",
cursoropacitymax:1,
touchbehavior:false,
cursorwidth:"10px",
cursorborder:"0",
cursorborderradius:"5px"
})
nicescroll詳細(xì)參數(shù)配置:
cursorcolor - 設(shè)置滾動(dòng)條顏色,默認(rèn)值是“#000000”
cursoropacitymin - 滾動(dòng)條透明度最小值
cursoropacitymax - 滾動(dòng)條透明度最大值
cursorwidth - 滾動(dòng)條的寬度像素,默認(rèn)為5(你可以寫“5PX”)
cursorborder - CSS定義邊框,默認(rèn)為“1px solid #FFF”
cursorborderradius - 滾動(dòng)條的邊框圓角
ZIndex的 - 改變滾動(dòng)條的DIV的z-index值,默認(rèn)值是9999
scrollspeed - 滾動(dòng)速度,默認(rèn)值是60
mousescrollstep - 滾動(dòng)鼠標(biāo)滾輪的速度,默認(rèn)值是40(像素)
touchbehavior - 讓滾動(dòng)條能拖動(dòng)滾動(dòng)觸摸設(shè)備默認(rèn)為false
hwacceleration - 使用硬件加速滾動(dòng)支持時(shí),默認(rèn)為true
boxzoom - 使變焦框的內(nèi)容,默認(rèn)為false
dblclickzoom - (僅當(dāng)boxzoom = TRUE)變焦啟動(dòng)時(shí),雙點(diǎn)擊框,默認(rèn)為true
gesturezoom - boxzoom = true并使用觸摸設(shè)備)變焦(僅當(dāng)激活時(shí),間距/盒,默認(rèn)為true
grabcursorenabled“搶”圖標(biāo),顯示div的touchbehavior = true時(shí),默認(rèn)值是true
autohidemode,如何隱藏滾動(dòng)條的作品,真正的默認(rèn)/“光標(biāo)”=只光標(biāo)隱藏/ FALSE =不隱藏
的背景下,改變鐵路背景的CSS,默認(rèn)值為“”
iframeautoresize中,AUTORESIZE iframe上的load事件(默認(rèn):true)
cursorminheight,設(shè)置最低滾動(dòng)條高度(默認(rèn)值:20)
preservenativescrolling,您可以用鼠標(biāo)滾動(dòng)本地滾動(dòng)的區(qū)域,鼓泡鼠標(biāo)滾輪事件(默認(rèn):true)
railoffset,您可以添加抵消頂部/左軌位置(默認(rèn):false)
bouncescroll,使?jié)L動(dòng)反彈結(jié)束時(shí)的內(nèi)容移動(dòng)(僅硬件ACCELL)(默認(rèn):FALSE)
spacebarenabled,允許使用空格鍵滾動(dòng)(默認(rèn):true)
railpadding,設(shè)置間距(默認(rèn):頂:0,右:0,左:0,底部:0})
disableoutline,Chrome瀏覽器,禁用綱要(橙色hightlight)時(shí),選擇一個(gè)div nicescroll(默認(rèn):true)
1、新建一個(gè)html文件,命名為test.html。
2、在test.html文件內(nèi),使用div標(biāo)簽創(chuàng)建一個(gè)模塊,并設(shè)置其id為mycss。
3、在css標(biāo)簽內(nèi),定義div的樣式,設(shè)置其寬度為100px,高度為2000px,背景顏色為粉紅色。
4、在js標(biāo)簽內(nèi),使用scroll()方法監(jiān)聽(tīng)頁(yè)面的滾動(dòng)條,并執(zhí)行function方法。
5、在function方法內(nèi),使用if語(yǔ)句判斷,當(dāng)前滾動(dòng)的位置(scrollTop())是否到達(dá)頁(yè)面的底部($(document).height()-$(window).height()),如果到達(dá)頁(yè)面底部,提示“已經(jīng)到底部了”。
當(dāng)前標(biāo)題:jquery文字滾動(dòng),jquery文字上下滾動(dòng)效果
網(wǎng)站鏈接:http://chinadenli.net/article18/dsggigp.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供服務(wù)器托管、ChatGPT、App開(kāi)發(fā)、網(wǎng)站策劃、軟件開(kāi)發(fā)、面包屑導(dǎo)航
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)