jQuery 褪色不透明度问题
对于客户,我试图让该网站在 IE 和其他网络浏览器中运行(目前仅在 Mac 版 Safari 和 Firefox 中运行):http://www.randomscripts.net/think_company_world/main.php 我在图片上使用 JQuery 的 fadeIn 和 fadeOut 函数在后台循环播放它们。 对于上面列出的浏览器之外的所有其他浏览器,它只是在内容上显示一个黑框。 我认为这可能与 opacity: CSS 属性有关,但我不太确定。
如果有人可以看一下,我将非常感激。
For a client, I am attempting to get this site to work in IE and other web browsers (currently only works in Safari and Firefox for Mac): http://www.randomscripts.net/think_company_world/main.php I am using JQuery's fadeIn and fadeOut functions on the pictures to cycle them through in the background. For every other browser beside those listed above, it simply displays a black box over the content. I am thinking that it may have to do with the opacity: CSS property but am not quite sure.
If anyone could take a look, I would really appreciate it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它似乎对我来说工作得很好(Vista 下的 Chrome、IE8 和 Firefox 3)。
您确定图像有时间加载吗? 如果将图像大小调整为 100x100 并重新运行脚本,是否会遇到同样的问题?
其他想法
我在第 320 行(nav 6 的子选项)上收到错误,因为页面上没有任何 id 为 nav6_sub 的项目,因此这可能会给您带来问题。
您在该页面上复制了大量代码(您是复制并粘贴还是在循环内创建它?),您可能应该考虑创建一个 jQuery 插件或其他东西。 我一直发现这个页面很有用(当然还有 jQuery 文档): http://www.learningjquery.com/2007/10/a-plugin-development-pattern
另外,它可能不相关,但子导航周围的 HTML 可能需要一些清理。 而不是
You 应该有类似的东西:
It seems to be working fine for me (Chrome, IE8 and Firefox 3. under Vista).
Are you sure the images are having time to load? Do you get the same problem if you resize the images to 100x100 and re-run the script?
Other thoughts
I'm getting an error on line 320 (sub options for nav 6) because you don't have any item on the page with an id of nav6_sub so that may be causing problems for you.
You're duplicating a lot of code on that page (are you copying and pasting or having it created inside a loop?), you should probably look at creating a jQuery plugin or something. I've always found this page to be useful (as well as the jQuery docs of course): http://www.learningjquery.com/2007/10/a-plugin-development-pattern
Also, it's probably not related, but your HTML around the sub navigation could use some cleaning up. Instead of
You should have something like have: