为什么我的字不能滚动

nowgo 2009-07-15 11:17:27
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>backstage</title>
<style type="text/css">
.div{
width: 863px;
height: 500px;
background-color: #9370DB;

}

.login{

width: 340px;
height: 216px;
margin-left: 280px;
margin-top: 140px;
}
.font{
width: 318px;
text-align: right;
color: #EFEFEF;
}
.text{
padding-left: 200px;
padding-top: 100px;
}
</style>

</head>

<body>
<div id="marquees">
赶紧干你的活去否则!嘿嘿,不给你发钱 赶紧干你的活去否则!嘿嘿,不给你发钱赶紧干你的活去否则!嘿嘿,不给你发钱
</div>

<div id="templayer" style="position:absolute;left:0;top:0;visibility:hidden"></div>
<script language="JavaScript">
marqueesWidth=318;
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.offsetWidth<marqueesWidth){
templayer.innerHTML+=marquees.innerHTML;
}
marquees.innerHTML+=templayer.innerHTML;
setInterval("scrollLeft()",10);
}init();

function scrollLeft(){
if(stopscroll==true) return;
preLeft=marquees.scrollLeft;
marquees.scrollLeft+=1;
if(preLeft==marquees.scrollLeft){
marquees.scrollLeft=templayer.offsetWidth-marqueesWidth+1;
}
}
</script>

<div class="div">

<div class="login">

<div>
<input type="text" name="name" />
<input type="text" name="pwd" />
<img src="file:///C|/Documents%20and%20Settings/Administrator/桌面/img/后台.JPG" width="318" height="216" />
</div>

</div>

</div>

</body>
</html>
...全文
65 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
mtrhhy 2009-07-15
  • 打赏
  • 举报
回复
这些代码可以滚动

<p><strong></strong><marquee align="center" height="67" scrollamount="2" width="60"><b><font color="#cf34f6" face="华文琥珀" size="6" style="FONT-WEIGHT: normal; FONT-SIZE: 30pt; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-VARIANT: normal">朋 朋</font></b></marquee><strong><img height="67" src="http://www.616bbs.com/picture/yn/tupian/shan.gif" width="109" /></strong><marquee align="center" height="67" scrollamount="2" width="60"><b><font color="#ff0000" face="华文琥珀" size="6" style="FONT-WEIGHT: normal; FONT-SIZE: 30pt; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-VARIANT: normal">友 友</font></b></marquee><strong><img height="67" src="http://www.616bbs.com/picture/yn/tupian/shan.gif" width="109" /></strong><marquee align="center" height="67" scrollamount="2" width="60"><b><font color="#0033cc" face="华文琥珀" size="6" style="FONT-WEIGHT: normal; FONT-SIZE: 30pt; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-VARIANT: normal">您 您</font></b></marquee><strong><img height="67" src="http://www.616bbs.com/picture/yn/tupian/shan.gif" width="109" /></strong><marquee align="center" height="67" scrollamount="2" width="60"><b><font color="#006633" face="华文琥珀" size="6" style="FONT-WEIGHT: normal; FONT-SIZE: 30pt; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-VARIANT: normal">好 好</font></b></marquee><strong><img height="67" src="http://www.616bbs.com/picture/yn/tupian/shan.gif" width="109" /></strong></p>
</td></tr>

62,621

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧