div+css+javascript 实现无缝滚动,marquee无缝滚动,无缝滚动,兼容firefox
用marquee实现首尾相连循环滚动效果(仅IE):
复制代码 代码如下:
<marquee behavior="scroll" contenteditable="true" onstart="this.firstChild.innerHTML+=this.firstChild.innerHTML;" scrollamount="3" width="100" onmouseover="this.stop();" onmouseout="this.start();">
这里是要滚动的内容
</marquee>
用div+css+javascript实现首尾相连循环滚动效果(兼容firefox):
复制代码 代码如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>div+css+javascript 实现无缝滚动,marquee无缝滚动,无缝滚动,兼容firefox</title>
<style type="text/css">
#scrollobj {
white-space: nowrap;
overflow: hidden;
width: 500px;
}
</style>
</head>
<body>
<div id="scrollobj" onmouseover="javascript:_stop();" onmouseout="javascript:_start();">
这里是要滚动的内容
</div>
<script language="javascript" type="text/javascript">
<>
</script>
</body>
</html>