横向无缝滚动,文字不能超过外框,否定会停,寻求解决。

来源:百度知道 编辑:UC知道 时间:2024/09/18 20:39:12
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//CH" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>横向无缝滚动</title>

<style type="text/css" media="all">
#Abox {width:100px;height:20px;overflow:hidden;white-space:nowrap;border:1px solid #333;}
#A div {width:auto;height:auto;float:left;overflow:hidden;}
</style>
<script language="javascript" type="text/javascript">
var As,As2,As3,As4,Atimer;
function init(){
As=getid("Abox");
As2=getid("A1");
As3=getid("A2");
As4=getid("A");
As4.style.wi

主要是这一部分:
#A div {width:auto;height:auto;float:left;overflow:hidden;}
以下是我改的,你看看:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//CH" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>横向无缝滚动</title>

<style type="text/css" media="all">
#Abox {width:100px;height:20px;overflow:hidden;white-space:nowrap;border:1px solid #333;}
#A div {width:100px;height:20px;float:left;overflow:hidden;}
</style>
<script language="javascript" type="text/javascript">
var As,As2,As3,As4,Atimer;
function init(){
As=getid("Abox");
As2=get