首页 > 代码库 > javaScript滚动新闻

javaScript滚动新闻

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>滚动新闻</title>
</head>
<style type="text/css">
	#div1{
		width:200px;
		height:80px; 
		background-color:#CCC; 
		position:absolute; 
		left:0px; 
		top:0px; 
		z-index:1;
		overflow:hidden;
	}
	#imgs{
		width:100px; 
		height:400px; 
		background-color:#9C9; 
		position:absolute; 
		left:200px; 
		top:0px; 
		z-index:1;			//垂直方向置于最顶层
		overflow:hidden;	//超出部分隐藏
	}
</style>
<body>
	<!--div 的高度设置比实际须要的高度小-->
	<div id="div1">
    	<ul id="news">
    		<li><a href=http://www.mamicode.com/"#">aaaaaaaaaaaaaaa>

javaScript滚动新闻