如何水平滚动图片? [英] How to scroll picture horizontally?

查看:68
本文介绍了如何水平滚动图片?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

网站的Gridview上有一些图片,我正在使用以下代码垂直滚动这些图片:

There is some picture on a Gridview in a website and i am scrolling those picture vertically using this following code:

<marquee direction="up" SCROLLDELAY="15" scrollamount="2" onmouseover=this.stop()

            onmouseout=this.start() style="height: 239px">

                        <asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>

                        <asp:GridView ID="grdad" runat="server" AutoGenerateColumns="False"

                                DataSourceID="AdDataSource" DataKeyNames="AdID" PageSize="1"

                                Height="240px" Width="181px" ShowHeader="false">
                        <Columns>
<asp:BoundField DataField="ProgrammeID" HeaderText="" Visible="false" ReadOnly="true" SortExpression="ProgrammeID" />
<asp:TemplateField ShowHeader="false">
<ItemTemplate>
<a href="<%# DataBinder.Eval(Container, "DataItem.AdLink") %>" target="_blank"><img id="imgSmall" src='Admin/Ad_Picture/<%# DataBinder.Eval(Container, "DataItem.AdImagePath") %>' alt="Gallery Image" width="181" height="205" /></a>
</ItemTemplate>
</asp:TemplateField>
</Columns>
                        </asp:GridView></marquee>
                        </ContentTemplate>
                        <Triggers>
<asp:AsyncPostBackTrigger ControlID = "grdad" />
</Triggers>
</asp:UpdatePanel></marquee>


<img id="imgSmall" src='Admin/Ad_Picture/<%# DataBinder.Eval(Container, "DataItem.AdImagePath") %>' alt="Gallery Image" width="181" height="205" /></a>
</ItemTemplate>
</asp:TemplateField>
</Columns>
                        </asp:GridView>
                        </ContentTemplate>
                        <Triggers>
<asp:AsyncPostBackTrigger ControlID = "grdad" />
</Triggers>
</asp:UpdatePanel></marquee>









Is that possible to scroll those picture Horizontally?

推荐答案

可能是您的HTML源代码中存在一些错误,您错过了js内容的双引号,请在下面进行检查
May be some mistakes in your HTML source, you missed double-quotes for the js things, check it below
<marquee direction="left" scrolldelay="15" scrollamount="2" onmouseover="<b">"this.stop();" onmouseout="this.start();" style="height: 239px">test</marquee>


一般建议只是尝试使用属性最少的标签(以确保运行),如下所示


And general suggestion is just try the Tags with minimum properties(to ensure the running) like below

<marquee direction="left" >test</marquee>


进一步阅读
HTML MARQUEE [


Further reading
HTML MARQUEE[^]


您是否尝试过direction =" left?
did you try direction="left"?


通过查看代码,有一个< marquee>并不奇怪.开头标签,但有两个关闭标签.可能是它们不匹配吗?
By looking your code, isn''t it strange that there is one <marquee> opening tag but two of closing.May be they don''t match?


这篇关于如何水平滚动图片?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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