asp.net怎么做广告轮显(图片存到数据库里)
想把数据库里的图片做成轮显广告,类似淘宝上的样式。后台添加图片在前台显示轮显,我用repeater做的显示不成功。<!--开始导航图片展示--><scripttype="...
想把数据库里的图片做成轮显广告,类似淘宝上的样式。后台添加图片在前台显示轮显,我用repeater做的显示不成功。
<!--开始导航图片展示-->
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.cycle.js"></script>
<script type="text/javascript">
$(function(){
$('#banner').cycle({
fx:'scrollLeft',
pager:'#btn'
});
})
</script>
<style type="text/css">
#banner
{
width:980px;
margin:0px auto;
height:227px;
overflow:hidden;
z-index:-1;
}
#btn
{display: inline;
width:110px;
hegiht:18px;
float:left;
margin:-30px 0px 0px 865px;
position:absolute;
z-index:1;
}
#btn a
{
color:#36f;
font:700 11px "Arial";
background:url(images/ibbtn.gif) no-repeat;
float:left;
width:18px;
height:18px;
line-height:18px;
text-align:center;
text-decoration:none;
margin-left:5px;
}
#btn a.activeSlide
{
color:#fff;
background:url(images/ibhbtn.gif) no-repeat;
}
#btn a:hover
{
color:#fff;
background:url(images/ibhbtn.gif) no-repeat;
}
</style>
<table width="980" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-bottom:5px">
<tr>
<td width="980"><div id="banner">
<!--<img src="images/ibanner3.gif" width="980" height="227px">
<img src="images/ibanner2.gif" width="980" height="227px" >
<img src="images/ibanner3.gif" width="980" height="227px" >-->
<asp:Repeater ID ="rupt" runat ="server" >
<ItemTemplate><a href ='aa.aspx?id=<%#Eval("PicID")%>' title ='<%#Eval("picTitle") %>' ><img src='<%#Eval("picUrl")%>' width="980px" height ="227px" border="0px" /></a></ItemTemplate>
</asp:Repeater>
</div>
<div id="btn"></div></td>
</tr>
</table>
<!--导航图片结束 -->
我的QQ:858487123 有案例的多指教 谢谢。 展开
<!--开始导航图片展示-->
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.cycle.js"></script>
<script type="text/javascript">
$(function(){
$('#banner').cycle({
fx:'scrollLeft',
pager:'#btn'
});
})
</script>
<style type="text/css">
#banner
{
width:980px;
margin:0px auto;
height:227px;
overflow:hidden;
z-index:-1;
}
#btn
{display: inline;
width:110px;
hegiht:18px;
float:left;
margin:-30px 0px 0px 865px;
position:absolute;
z-index:1;
}
#btn a
{
color:#36f;
font:700 11px "Arial";
background:url(images/ibbtn.gif) no-repeat;
float:left;
width:18px;
height:18px;
line-height:18px;
text-align:center;
text-decoration:none;
margin-left:5px;
}
#btn a.activeSlide
{
color:#fff;
background:url(images/ibhbtn.gif) no-repeat;
}
#btn a:hover
{
color:#fff;
background:url(images/ibhbtn.gif) no-repeat;
}
</style>
<table width="980" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-bottom:5px">
<tr>
<td width="980"><div id="banner">
<!--<img src="images/ibanner3.gif" width="980" height="227px">
<img src="images/ibanner2.gif" width="980" height="227px" >
<img src="images/ibanner3.gif" width="980" height="227px" >-->
<asp:Repeater ID ="rupt" runat ="server" >
<ItemTemplate><a href ='aa.aspx?id=<%#Eval("PicID")%>' title ='<%#Eval("picTitle") %>' ><img src='<%#Eval("picUrl")%>' width="980px" height ="227px" border="0px" /></a></ItemTemplate>
</asp:Repeater>
</div>
<div id="btn"></div></td>
</tr>
</table>
<!--导航图片结束 -->
我的QQ:858487123 有案例的多指教 谢谢。 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询