index.aspx代码<body style=" margin:0;"><form id="Form1" runat="server">
<div id="content">
<div id="td">
<iframe frameborder="0" marginheight="0" marginwidth="0" scrolling="no"
src="head.html" style="height: 170px; width: 928px"></iframe>
<table cellspacing="0" cellpadding ="0" width="928" border ="0"
style="margin-left :0px; margin-top :2px; height:254px;" >
<tr>
<td width="263" valign="top" style="height: 182px">
<div id="layout">
<ul id="tabnav">
<li onclick="go(1);" class="current">111111</li>
<li onclick="go(2);">222222</li>
<li onclick="go(3);">333333</li>
<li onclick="go(4);">444444</li>
<li onclick="go(5);">555555</li>
</ul>
<div id="tab">
<ul id="tabnav02">
<li ></li>
<li ></li>
<li ></li>
<li ></li>
<li ></li>
</ul>
<div id="tabcon_1" class="tabcon block">
精华帖子内容
</div>
<div id="tabcon_2" class="tabcon">
最新帖子内容
</div>
<div id="tabcon_3" class="tabcon">
最旧帖子内容
</div>
<div id="tabcon_4" class="tabcon">
最热帖子内容
</div>
<div id="tabcon_5" class="tabcon">
图片帖子内容 图片帖子内容
</div>
<script type="text/javascript">
<!--
var h=document.getElementById("tabnav").getElementsByTagName("li");
function go(s){
for(var i=1;i<=h.length;i++){
if(s==i){
h[i-1].className="current";
document.getElementById("tabcon_"+i).className="tabcon block";
}
else{
h[i-1].className="";
document.getElementById("tabcon_"+i).className="tabcon";
}
}
}
//-->
</script>
</div>
</div>
<div>
<h1 > </h1>
</div>
</td>//图片轮换
<td valign="top" style="height: 182px" >
<table style="width:15%; height: 223px;" align="left">
<tr>
<td class="style" valign="top" style="width:30%" align="right">
<div id="focus">
<div id="no" style="left: 150px; ">
<ul>
<li id="t0" class="bbg1" onmouseout="setAuto()" onmouseover="Mea(0);clearAuto();">1</li>
<li id="t1" class="bbg0" onmouseout="setAuto()" onmouseover="Mea(1);clearAuto();">2</li>
<li id="t2" class="bbg0" onmouseout="setAuto()" onmouseover="Mea(2);clearAuto();">3</li>
<li id="t3" class="bbg0" onmouseout="setAuto()" onmouseover="Mea(3);clearAuto()">4 </li>
<li id="t4" class="bbg0" onmouseout="setAuto()" onmouseover="Mea(4);clearAuto();">5 </li>
<li id="t5" class="bbg0" onmouseout="setAuto()" onmouseover="Mea(5);clearAuto();">6</li>
</ul>
</div>
<div id="au">
<% lunhuan(); %>
</div>
<div id="conau" >
<div style="display: block">
</div>
<div style="display: none">
</div>
<div style="display: none">
</div>
<div style="display: none">
</div>
<div style="display: none">
</div>
<div style="display: none">
</div>
</div>
</div>
<br /><br />
<div id="au1">
<asp:AccessDataSource ID="AccessDataSource4" runat="server" DataFile="~/App_Data/net.mdb"
SelectCommand="SELECT TOP 6 id, imgurl FROM tpguangao ORDER BY id DESC"></asp:AccessDataSource>
</div>
</td>
</tr>
</table>
</div>
</td>
<td width="400" valign="top" style="height: 182px">
<div>
</div>
</td>
</tr>
</table>
</div>
</div>
</form>
</body>
pic.css文件
*{margin:0; padding:0;}
#focus {
CLEAR: both; MARGIN: 0px; WIDTH:300px; POSITION: relative; HEIGHT: 0px;top:0
}
#no {
Z-INDEX: 5; LEFT: 420px; WIDTH: 125px; POSITION: absolute; TOP: 73px
}
#no UL {
CLEAR: both; PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 10px/20px Arial; WIDTH: 115px; PADDING-TOP: 0px; HEIGHT: 5px
}
#no LI {
PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; FLOAT: left; WIDTH: 16px;
MARGIN-RIGHT: 1px; PADDING-TOP: 2px; HEIGHT: 11px; TEXT-ALIGN: center
}
#no .bbg0 {
FONT-SIZE: 10px; BACKGROUND: url(file:///C|/DOCUME~1/ADMINI~1/LOCALS~1/Temp/Temporary Internet Files/Content.IE5/O1UV89MZ/focus1.gif); CURSOR: pointer; COLOR: White; background-color:Green; LINE-HEIGHT: 11px; FONT-FAMILY: Arial
}
#no .bbg0 A {
COLOR: Green; TEXT-DECORATION: none;
}
#no .bbg1 {
FONT-SIZE: 10px; BACKGROUND: url(file:///C|/DOCUME~1/ADMINI~1/LOCALS~1/Temp/Temporary Internet Files/Content.IE5/O1UV89MZ/focus.gif); CURSOR: pointer; COLOR: white; LINE-HEIGHT: 11px; FONT-FAMILY: Arial
}
#no .bbg1 A {
COLOR: Green; TEXT-DECORATION: none
}
#au {
FILTER: progid:DXImageTransform.Microsoft.Fade ( duration=0.5,overlap=1.0 ); WIDTH: 300px;
HEIGHT: 0px
}
#au IMG {
WIDTH: 309px; HEIGHT: 200; border:0;top:0px
}
1.<marquee> 这个标签这默认vs html设置编辑器是不能使用的(用了也没关系),现在几乎所有的浏览器都是支持marquee的放心用就是。
2.图片轮换,那个有很多种呢,你要什么样的啊,要想漂亮点的用falsh很好。js写起来挺烦了,不过写好的代码相当多的,找一下就是
3.鼠标经过更换:
有两种实现:
1,先把每一篇都全部读出隐藏,title 的onmouseover的时候显示出来即可
2,数据较多的时候还是用ajax好些
你发了很多代码,不过大部分都没用的,看得很累,而且不好理解,还有lunhuan()这个你没有解析出来,别人不知道里面是什么。
如果你是想实现无间缝的Table Td移动,可以使用以下代码:
<table width="260px" align="center" border="0">
<tbody>
<tr>
<td align="middle">
<div id="demo" style="margin-top: 0px; overflow: hidden; width: 250px; height: 210px">
<table width="100%" align="center" bgcolor="#b2b2b2" border="0">
<tbody>
<tr>
<td id="demo1" align="middle">
<table width="250px" align="center" border="0">
<tbody>
<tr>
<!--利用数据源控件Repeater或其它控件循环读出TD就可以了!-->
<td align="middle"><img src="images/topimg.jpg" border="1" width="230px" height="200px" /></td>
<td align="middle"><img src="images/topimg.jpg" border="1" width="230px" height="200px" /></td>
</tr>
</tbody>
</table>
</td>
<td id="demo2">
</td>
</tr>
</tbody>
</table>
</div>
</td>
</tr>
</tbody>
</table>
<script>
var speed=30//速度数值越大速度越慢
demo2.innerHTML=demo1.innerHTML
function Marquee(){
if(demo2.offsetWidth-demo.scrollLeft<=0)
demo.scrollLeft-=demo1.offsetWidth
else{
demo.scrollLeft++
}
}
var MyMar=setInterval(Marquee,speed)
demo.onmouseover=function() {clearInterval(MyMar)}
demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
</script>
园子有很多无间marquee滚动的JS框架,另外这和VS2008没有太大的关系。
http://www.cnblogs.com/cloudgamer/tag/%E6%97%A0%E7%BC%9D%E6%BB%9A%E5%8A%A8/