IE8 中的平滑滚动条...不可能吗?
让我解释一下我的情况。
我有一个用 PHP 生成的网页,其中有很多带有翻转效果的 div。它代表一个包含超过 200 个单元格的表格,但由 div 而不是表格组成,因为我读过它们效率更高(特别是在 IE8 中,这在这个项目中变成了我的噩梦!)
在同一页面中我想要为带有水平文本滚动的用户消息放置一个滚动条。 我尝试以不同的方式实现股票代码:纯 Javascript 或使用 jquery 插件:
http://remysharp.com/2008/09/10/the-silky-smooth-marquee/
嗯,问题是,当页面加载时,股票行情自动收录器效果很好,但一旦用户启动将光标移动到表格上(触发翻转效果),股票行情指示器在 IE8 中变得非常不稳定(Firefox 工作几乎完美)
经过大量调整我的 PHP/HTML 代码的工作后,我放弃了,决定为股票行情指示器嵌入一个 flash 对象为了减轻浏览器部分的脚本编写并将其委托给 Flash。让我惊讶的是它也有同样的缺陷。我不是浏览器如何处理 Flash 对象的专家,但我真的认为这将是一个解决方案。
我找到了一个可以说明问题的例子。
http://activeden.net/item/xml -news-ticker/7911?red...tudio&clickthrough_id=23795538
这是一个带有商业 Flash 对象的页面。这确实比我需要的要多得多,但如果您尝试(使用 IE8)将光标移动到页面的右侧部分,在具有翻转效果的元素上,您会注意到股票行情指示器变得不那么平滑。想象一下,在一个有 200 个 div 的页面内!
好吧,我的问题是:我能做些什么来使这个设计按预期工作(股票和翻转效果同时工作)? 我更喜欢用 javascript/jquery 来完成这个,但如果它是解决方案,我不会放弃 flash(看起来并非如此)
顺便说一句,我尝试用 java applet 来实现这一点,结果是它工作得很好。无论如何,我只认为这是最后一个选择,因为我想避免使用这项技术的不便。
多谢!
托尼
Let me explain my scenario.
I have a web page generated with PHP which has a lot of divs with rollover effects. It represents a table with more than 200 cells, but is made of divs instead of a table because I've read they are more efficient (specially in IE8 which has turn out my nightmare in this project!)
In the same page I want to put a ticker for user messages with horizontal text scrolling.
I have tried to implement the ticker in different ways: pure Javascript or with jquery pluggins:
http://remysharp.com/2008/09/10/the-silky-smooth-marquee/
Well, the thing is that the ticker works great when the page loads, but as soon as the user starts to move the cursor over the table (rollover effects are triggered) the ticker becomes very jerky in IE8 (Firefox works almost perfect)
After a lot of work tunning my PHP/HTML code I gave up and decided to embed a flash object for the ticker in order to relieve the browser part of the scripting and delegate it to flash. My surprise was that it had the same defect. I am not an expert in how the browser deals with flash objects but I really though it would be a solution.
I've found a example which illustrate the problem.
http://activeden.net/item/xml-news-ticker/7911?red...tudio&clickthrough_id=23795538
This a page with a commercial flash object. It's really much more than what I need, but if you try (with IE8) to move the cursor around the right section of the page, over the elements with rollover effects, you'll notice that the ticker becomes less smooth. Imagine that within a page with 200 divs!
Well my question here is: Is there anything I can do to make this design work as expected (ticker and rollover effects working simultaneously)?
I would prefer acomplish this with javascript/jquery but I wont renounce to flash if it's the solution (it doesn't seem so)
By the way, I have tried to achieve this with a java applet and the result is that it works perfectly. Anyway I only considerer this as the last option because I want to avoid the inconvenients of using this technology.
Thanks a lot!
Toni
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只是为了让您知道是否仍未解决问题,请查看 jQuery WebTicker 它应该是一个相对容易的实现。它与包括 IE8 在内的所有主流浏览器兼容。由于我的机器上没有 IE8,因此无法 100% 确认性能,但已发现它足以在一些重要的金融网站上使用;它本身相当轻量,节省了大量的内存和闪存使用量。
just to let you know if you have no still resolved the problem check out the jQuery WebTicker it should be a relatively easy implementation. It is compatible with all major browsers including IE8. Cannot confirm performance 100% since I do not have IE8 on this machine but it has been found good enough to be used on some important Financial Websites; its pretty lightweight in itself and saves up a lot of memory and flash usage.