文字不间断左滚动代码(指定滚动文字的滚动延时)
admin 发布:2022-12-19 20:53 159
今天给各位分享文字不间断左滚动代码的知识,其中也会对指定滚动文字的滚动延时进行解释,如果能碰巧解决你现在面临的问题,别忘了关注本站,现在开始吧!
本文目录一览:
文字循环不间断向左滚动代码怎么写?
style type="text/css"
!--
body {
font-size: 9pt;
color: #000000;
}
a {
color: #0000FF;
text-decoration: none;
}
a:hover {
color: #FF0000;
text-decoration: underline;
}
--
/style
/head
body
div id="marquees" a href="#"链接一/a a href="#"链接二/a a href="#"链接三/a a href="#"链接四/a /div
div id="templayer" style="position:absolute;left:0;top:0;visibility:hidden"/div
script language="JavaScript"marqueesWidth=200;with(marquees){
style.height=0;
style.width=marqueesWidth;
style.overflowX="hidden";
style.overflowY="visible";
noWrap=true;
onmouseover=new Function("stopscroll=true");
onmouseout=new Function("stopscroll=false");
}
preLeft=0; currentLeft=0; stopscroll=false;function init(){
templayer.innerHTML="";
while(templayer.offsetWidthmarqueesWidth){
templayer.innerHTML+=marquees.innerHTML;
}
marquees.innerHTML+=templayer.innerHTML;
setInterval("scrollLeft()",100);
}init();function scrollLeft(){
if(stopscroll==true) return;
preLeft=marquees.scrollLeft;
marquees.scrollLeft+=1;
if(preLeft==marquees.scrollLeft){
marquees.scrollLeft=templayer.offsetWidth-marqueesWidth+1;
}
}
/script
/body
关于动态左右滚动字代码
br
主题名称:图像特殊效果br
br
特效名称:左右移动的图片br
br [修改图片名称即可][共2步]
br1、将以下代码加入到HEML的head/head之间:
script LANGUAGE="JavaScript"!--
step = 0;
obj = new Image();
function anim(xp,xk,smer) //smer = direction
{
obj.style.left = x;
x += step*smer;
if (x=(xk+xp)/2) {
if (smer == 1) step--;
else step++;
}
else {
if (smer == 1) step++;
else step--;
}
if (x = xk) {
x = xk;
smer = -1;
}
if (x = xp) {
x = xp;
smer = 1;
}
// if (smer 2) smer = 3;
setTimeout('anim('+xp+','+xk+','+smer+')', 50);
}
function moveLR(objID,movingarea_width,c)
{
if (navigator.appName=="Netscape") window_width = window.innerWidth;
else window_width = document.body.offsetWidth;
obj = document.images[objID];
image_width = obj.width;
x1 = obj.style.left;
x = Number(x1.substring(0,x1.length-2)); // 30px - 30
if (c == 0) {
if (movingarea_width == 0) {
right_margin = window_width - image_width;
anim(x,right_margin,1);
}
else {
right_margin = x + movingarea_width - image_width;
if (movingarea_width x + image_width) window.alert("No space for moving!");
else anim(x,right_margin,1);
}
}
else {
if (movingarea_width == 0) right_margin = window_width - image_width;
else {
x = Math.round((window_width-movingarea_width)/2);
right_margin = Math.round((window_width+movingarea_width)/2)-image_width;
}
anim(x,right_margin,1);
}
}
//--/script
br2、将以下代码加入到HEML的body/body之间:
img src="1548.jpg" name="picture"
style="position: absolute; top: 70px; left: 30px;" BORDER="0" WIDTH="140" HEIGHT="40"
script LANGUAGE="JavaScript"!--
setTimeout("moveLR('picture',300,1)",10);
//--/script
html/html
html/html
看这个对你有不有帮助!
从右向左不间断的文字滚动代码
不间断的需要js代码
间断的就简单了
marquee
direction="left"
滚动的内容/marquee
文字不间断左滚动代码的介绍就聊到这里吧,感谢你花时间阅读本站内容,更多关于指定滚动文字的滚动延时、文字不间断左滚动代码的信息别忘了在本站进行查找喔。
版权说明:如非注明,本站文章均为 AH站长 原创,转载请注明出处和附带本文链接;
- 上一篇:代码和源代码的区别(源代码和源码一样吗)
- 下一篇:拍卖网站代码(拍卖网站代码大全)
相关推荐
- 05-09网页代码,网页代码快捷键
- 05-06单页网站的代码(完整的网页代码)[20240506更新]
- 05-06个人主页图片代码(个人主页图片代码怎么弄)[20240506更新]
- 05-06提取微信名片代码(微信名片信息提取)[20240506更新]
- 05-06php后台权限管理代码(php管理员权限)[20240506更新]
- 05-06付费观看代码php(付费观看代码)[20240506更新]
- 05-06在线html执行代码(html怎么运行)[20240506更新]
- 05-06源代码管理资源管理器(资源管理器运行代码)[20240506更新]
- 05-06代码源软件库(程序代码库)[20240506更新]
- 05-06点击弹出密码代码(点击弹出密码代码错误)[20240506更新]
取消回复欢迎 你 发表评论:
- 标签列表
- 最近发表
- 友情链接