js左右滚动代码怎么写

1. 怎样写一个可控制左右滚动的的字体左右滚动代码 如果您懂得Jquery 。
Code: Test<body> 欢迎继续提问 。
2. 怎样写一个可控制左右滚动的的字体左右滚动代码 如果您懂得Jquery 。
Code:
<html>
<head>
<title>Test</title>
<script src="http://www.xuexi88.com/zhishi/jquery.js"></script>
<script>
$(function(){
【js左右滚动代码怎么写】$("#left").click(function(){ $("div").animate({"left":"+=50px"});});
$("#right").click(function(){ $("div").animate({"right":"+=50px"});});
});
</script>
</head>
<body>
<div style="width:200px;height:100px;margin:100px auto;position:relative;">
<input type="button" id="left" value="http://www.xuexi88.com/zhishi/左移动">
<input type="button" id="right" value="http://www.xuexi88.com/zhishi/右移动">
</div>
</body>
</html>
欢迎继续提问
3. 求JS文字左右滚动代码 保存成html文件,打开就能看到效果了 。
<html>
<head>
<title>left to right</title>
</head>
<script type="text/javascript">
function onl oad() {
window
.setInterval(
function() {
var marginLeft = document
.getElementById("leftToRight").style.marginLeft;
moveAfterLeft = marginLeft.substr(0, marginLeft.length - 2) * 1 + 50;
if (moveAfterLeft < screen.width - 150) {
document.getElementById("leftToRight").style.marginLeft = moveAfterLeft;
} else {
clearInterval();
}
}, 100);
}
</script>
<body onl oad="onload()">
<ul>
<li id="leftToRight" style="margin-left: 0; width: 100px">left to
right</li>
</ul>
</body>
</html>
4. js图片左右滚动 怎么弄 有没案例代码 求帮忙 1.jquery.imgScroll.js;(function($){$.fn.extend({"imgScroll":function(object){object=$.extend({firstDiv:null,scrollBox:null,scrollImgBox:null,tabDiv:null,tabDivList:null,botPrev:null,botNext:null,changeType:"slide",thumbNowClass:'on',thumbOverEvent:true,changeTime:5000,ImgBoxMar:0,flag:true},object||{});var imgLen=$(object.scrollImgBox).length;var imgNum=0;var tabNum=0;var nowIndex=0;var index;var scrollWid=$(object.scrollImgBox).width()+object.ImgBoxMar;$(object.scrollImgBox).clone().appendTo($(this));function changeEffectNext(){if(object.changeType=='slide'){if(imgNum0){imgNum--}else{if(imgNum==0){$(object.scrollBox).css({'margin-left':-scrollWid*imgLen});imgNum=imgLen-1}}$(object.scrollBox).animate({'margin-left':-scrollWid*imgNum});if(tabNum>0){tabNum--}else{if(tabNum==0){tabNum=imgLen-1}}$(object.tabDivList).eq(tabNum).addClass(object.thumbNowClass);$(object.tabDivList).eq(tabNum).siblings().removeClass(object.thumbNowClass)}if(object.changeType=='fadein'){if(imgNum>0){imgNum--}else{if(imgNum==0){imgNum=imgLen-1}}$(object.scrollImgBox).eq(imgNum).fadeIn('slow');$(object.scrollImgBox).eq(imgNum).siblings().fadeOut('slow');$(object.tabDivList).eq(imgNum).addClass(object.thumbNowClass);$(object.tabDivList).eq(imgNum).siblings().removeClass(object.thumbNowClass)}}if(object.flag==true){var s=setInterval(changeEffectNext,object.changeTime);$(object.firstDiv).hover(function(){clearInterval(s)},function(){s=setInterval(changeEffectNext,object.changeTime);});$(object.tabDiv).hover(function(){clearInterval(s)},function(){s=setInterval(changeEffectNext,object.changeTime)});$(object.botPrev).bind("click",function(){clearInterval(s)}).bind("mouseover",function(){clearInterval(s)});$(object.botNext).bind("click",function(){clearInterval(s)}).bind("mouseover",function(){clearInterval(s)})};$(object.botNext).click(function(){changeEffectNext()});$(object.botPrev).click(function(){changeEffectPrev()});function changesmallImg(index){$(object.tabDivList).eq(index).addClass(object.thumbNowClass);$(object.tabDivList).eq(index).siblings().removeClass(object.thumbNowClass);if(object.changeType=='slide'){$(object.scrollBox).animate({'margin-left':-scrollWid*index})}if(object.changeType=='fadein'){$(object.scrollImgBox).eq(index).fadeIn('slow');$(object.scrollImgBox).eq(index).siblings().fadeOut('slow')}imgNum=index;tabNum=index}if(object.thumbOverEvent==true){$(object.tabDivList).click(function(){var index=$(this).index();changesmallImg(index)})}if(object.thumbOverEvent==false){$(object.tabDivList).hover(function(){var index=$(this).index();changesmallImg(index)})}}})})(jQuery);2.html结构a,.lbPeo{-webkit-transition:all .2s ease-in-out 0s;-o-transition:all .2s ease-in-out 0s;-moz-transition:all .2s ease-in-out 0s;-ms-transition:all .2s ease-in-out 0s;transition:all .2s ease-in-out 0s;}.lbCon{margin-top:33px;margin-bottom:37px;position: relative;}.lbBtn{display:block;position: absolute;top:0;width:40px;height:143px;border:1px solid #D7D2CA;background:url('../../../images/special/140801/ctr_prev.png') no-repeat center center;}.lbPrev{left:0}.lbNext{right:0;background-image:url('../../../images/special/140801/ctr_next.png')}.lbBtn:hover{background-color: #ddd;}.lbBox{width:900px;height:145px;margin-left: 50px;overflow: hidden;position: relative;}.lbList{width:1000%;}.lbBox ul{float:left}.lbBox li{float:left;width:150px;height:145px;overflow: hidden;}.lbPeo{text-align:center;line-height:18px;font-family:"微软雅黑";color:#333}.lbPeo img{display:block;border: 1px solid #ddd;width:84px;height:103px;margin-left:32px;*margin-left:5px;}.lbPeo h5{font-weight: bold;font-size:12px;padding-top: 5px;*padding-top: 0}.lbPeo h6{font-size:12px;}.lbBox li a:hover{text-decoration: none}.lbBox li a:hover .lbPeo{color:#ff9600}