如何实现可滚动的图像和文本 [英] How to achieve the scrollable images and text
本文介绍了如何实现可滚动的图像和文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好我有div加载来自C#的所有图像和文本但我尝试了所有可能的方法来实现但不能。我想要两个按钮(向左,向右),所以通过点击我想在DIV中逐个显示图像,如滑动。它下面显示的是图像列表但它不会移动使用的jquery。我很感激任何建议。
Hello I have div which load all images and text from C# but I tried every possible way to achieve but could not. I want to have two buttons (LEFT,RIGHT) so by clicking i want to show images one by one in a DIV like sliding. The onebelow it show list of images but it wont move which ever jquery used. Please I am grateful for any suggestions.
ViewState["Page"] = Page;
StringBuilder mStr = new StringBuilder();
DataTable dtGames = new DataTable();
dtGames = GameLib.Game.SelectFreeGames();
mStr.Clear();
if (dtGames != null)
{
if (dtGames.Rows.Count > 0)
{
ataView dv = new DataView();
dv = dtGames.DefaultView;
mStr.Append(" <div id='wn'>");
mStr.Append("<div id='lyr1'> <ul id='horiz'>");
if (dv.Count > 0)
{
for (int i = 0; i < dv.Count; i++)
{
mStr.Append("<li width='450' height='110' style='padding-left:5px; padding-right:5px; padding-top:2px; padding-bottom:2px;'>");
mStr.Append("<a href='PlayGame.aspx?GameID=" + GameLib.Utilities.Encrypt(dv[i][1].ToString()) + "'>");
mStr.Append("<img src='../" + dv[i][10].ToString() + "' width='156px' height='109px' style='padding-left:0px;' />");
mStr.Append("</a>");
mStr.Append("</li>");
}
mStr.Append("</ul></div></div>");
RelatedGames.InnerHtml.Remove(0, RelatedGames.InnerHtml.Length);
RelatedGames.InnerHtml = mStr.ToString();
}
}
我想要这样做
http://i976.photobucket.com/albums/ae246/swebee/2014-06-04_170237.jpg
推荐答案
尝试 jquerytools-scrollable [ ^ ]
这篇关于如何实现可滚动的图像和文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文