新闻自动收报机,jquery.li.scroller空格删除 [英] news ticker,jquery.li.scroller empty space remove

查看:46
本文介绍了新闻自动收报机,jquery.li.scroller空格删除的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用带有ul和li的转发器控件来保存数据而jquery.li.scroller用于滚动,问题是在所有列表项水平滚动屏幕后很快出现问题,看到空白空间的宽度等于屏幕宽度,如何删除空白空间并迭代列表项而不留空格/空格





我正在使用

* liScroll 1.0

*版本:1。0。2。1(2011年4月22日)



任何建议都表示赞赏。

解决方案

通过以下链接...将其作为演示进行研究....尝试在您的代码中实现...

http://rajeshssingh.blogspot.in/2009/10/remove-gap-between-marquee- tags.html [ ^ ]

并且你在u imp中也在这段代码中添加了body标签学习的东西.....因为它不包含身体标签...也做一些必要的改变...


也尝试这个代码....

.aspx文件如下



 <   head     runat   = 服务器 >  
< title > 连续滚动图片< / title >
< meta http-equiv = 内容类型 内容 = text / html; charset = iso-8859-1 >

< style type = text / css >
正文 {
background-image url(images / bodyBg.jpg);
background-color #006;
}
container {
position relative;
width 424px;
height 106px;
溢出 hidden;
border 5px double#000;
background-color < span class =code-keyword>#fff;
margin 100px auto 0 auto;
}
div1 {
< span class =code-attribute> position 绝对;
< span class =code-attribute> left 0px;
top 0px;
width 424px;
height 106px;
}
div2 {
position 绝对;
left 424px;
top 0px;
width 424px;
身高 106px;
}
img {
border 1px solid#000;
margin 2px;
float left;
}
< / style >

< script type = text / javascript >
var m = 0 ;
var n = 424 ;
var speed = 20 ;
function scrollPics(){
document .getElementById(' div1')。style.left = m + ' PX';
m--;
n--;
if (m == - 424){
m = 0 ;
}
if (n == - 424){
n = 424 ;
}
setTimeout(' scrollPics()',speed);
}
window .onload = function (){
scrollPics ();
}
< / 脚本 >

< / meta > < / head >
< body >

< div id = 容器 >

< div ID = div1 >

< asp:datalist id = dtlist runat = server repeatcolumns = 8 cellpadding = 5 < span class =code-attribute> xmlns:asp
= #unknown >
< itemtemplate >
< div > < asp:hyperlink id = HyperLink1 class = 预览 工具提示 = <% #Bind(< span class =code-string> 名称)%>
navigateurl = <% #Bind( 名称 〜/ Images / {0})%> runat = 服务器 >
< asp:image width = 100 id = Image1 imageurl = <% #Bind( 名称 〜/ Images / {0})%> runat = server / >
< / asp:超链接 > < / div >
< / itemtemplate >
< item style bordercolor = 布朗 border style = 实体 borderwidth = 3px horizo​​ntalalign = 中心 >
VerticalAlign =Bottom/>
< / item style > < / asp:datalist >
< / div >


< / div >

< / body >







.................

in .cs文件绑定datalist或你的转发器控制...


I am using a repeater control with ul and li for holding data and jquery.li.scroller for scrolling, the problem is soon after all the list items scroll over the screen horizontally, empty space is seen with a width equals screen width, how to remove that empty space and iterate the list items without gap/empty space


I am using
* liScroll 1.0
* Version: 1.0.2.1 (22-APRIL-2011)

any suggestion is appreciated.

解决方案

go through following link...study it as demo ....try to implement in ur code...
http://rajeshssingh.blogspot.in/2009/10/remove-gap-between-marquee-tags.html[^]
and also u have add body tag in this code when u implement for study.....because it is not contain body tag...also do some required changes...


also try this code....
.aspx file as follow

<head runat="server">
   <title>continuous scrolling images</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<style type="text/css">
body {
     background-image:url(images/bodyBg.jpg);
     background-color:#006;
 }
#container {
     position:relative;
     width:424px;
     height:106px;
     overflow:hidden;
     border:5px double #000;
     background-color:#fff;
     margin:100px auto 0 auto;
 }
#div1 {
     position:absolute;
     left:0px;
     top:0px;
     width:424px;
     height:106px;
 }
#div2 {
     position:absolute;
     left:424px;
     top:0px;
     width:424px;
     height:106px;
 }
img {
     border:1px solid #000;
     margin:2px;
     float:left;
 }
</style>

<script type="text/javascript">
  var m=0;
  var n=424;
  var speed=20;
function scrollPics() {
     document.getElementById('div1').style.left=m+'px';
   m--;
   n--;
if(m==-424) {
   m=0;
 }
if(n==-424) {
   n=424;
 }
setTimeout('scrollPics()',speed);
 } 
window.onload=function() {
   scrollPics();
 }
</script>

</meta></head>
<body>

<div id="container">

<div id="div1">

<asp:datalist id="dtlist" runat="server" repeatcolumns="8" cellpadding="5" xmlns:asp="#unknown">
<itemtemplate>
<div><asp:hyperlink id="HyperLink1" class="preview" tooltip="<%#Bind("Name") %>" navigateurl="<%# Bind("Name", "~/Images/{0}") %>" runat="server">
<asp:image width="100" id="Image1" imageurl="<%# Bind("Name", "~/Images/{0}") %>" runat="server" />
</asp:hyperlink></div>
</itemtemplate>
<itemstyle bordercolor="Brown" borderstyle="Solid" borderwidth="3px" horizontalalign="Center">
VerticalAlign="Bottom" />
</itemstyle></asp:datalist>
</div>


</div>

</body>




.................
in .cs file bind datalist or ur repeater control...


这篇关于新闻自动收报机,jquery.li.scroller空格删除的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆