如何自动滚动包含纯文本的 div(水平)?
在此请多多包涵!我熟悉了基本的 HTML,并决定将 Web 编程作为我的职业。我报名了一个项目,现在正在第四学期编写我的第一个现场项目。我们的课程主要涉及 .NET Framework,我一般对 Javascript 和客户端编程非常不熟悉。
希望我概述的这些信息足以让这个社区的优秀成员有机会帮助崭露头角的开发人员。
目标:在页面上无限期地水平滚动包含纯文本的 div 环境:运行ASP.NET 4.0的Windows服务器。 语言:C#/XHTML/Javascript 使用的工具:jQuery、jQueryTools、SmoothDivScroll
我尝试使用名为 SmoothDivScroll 的 jQuery 插件以及 jQueryTools 来执行我的目标,但是,由于我缺乏客户端经验,我完全没有成功。
我的网页位于 http://paysonfirst assembly.com/ ,我尝试滚动的 div 有一个类和滚动面板的 ID。
如果有帮助的话我可以提供示例代码。
——泰勒
Please bear with me here! I familiarized myself with basic HTML and decided web programming would be my occupation. I enrolled in a program and am now writing my first live project in my fourth semester. Our classes deal mainly in the .NET Framework and I am very unfamiliar with Javascript and client-side programming in general.
Hopefully I outline this information enough to give the great members of this community a chance to help a budding developer.
Objective: Scroll a div containing plain text horizontally across a page indefinitely
Environment: Windows server running ASP.NET 4.0.
Language: C#/XHTML/Javascript
Tools Used: jQuery, jQueryTools, SmoothDivScroll
I have attempted to use a jQuery plugin known as SmoothDivScroll as well as jQueryTools to execute my objective, however, with my lack of client-side experience, I have had absolutely no success.
My webpage is available at http://paysonfirstassembly.com/ and the div that I am attempting to scroll has a class and ID of scrollingPanel.
I can provide sample code if it will help.
-Taylor
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这似乎满足您的需求: http://plugins.jquery.com/project/jqScroller
您的HTML 应如下所示:
请参阅此页面源代码以了解更多功能和调整
This seems to fit your needs: http://plugins.jquery.com/project/jqScroller
your HTML should be like this:
See this page source code for more functions and tweaks
Remy Sharp 有一个很好的 jQuery Marquee 实现这里,其中 一些演示。这允许你做
然后
用他的插件包含。
Remy Sharp has a good jQuery Marquee implementation here with some demos. This allows you to do
and then
with his plug-in included.
像这样将文本包裹在选框标签中
尽管如此,我个人不推荐此解决方案。但它会像魅力一样对你的大学项目有用。它不需要任何外部脚本。
Wrap your text in marquee tag like this
Though, I personally DO NOT RECOMMEND this solution. But it will work for your college project like charm. It doesn't need any external scripts.