FF 中使用 FadeTo 的奇怪 jQuery 行为

发布于 2024-10-14 19:10:49 字数 786 浏览 3 评论 0原文

问候。

我的网站上的 jQuery 遇到了一个奇怪的问题。

我正在尝试在按钮上模拟 webkit 转换,以便每个人都能获得闪亮的东西。正如我从谷歌搜索中预测的那样,这是一种巨大的痛苦。

因此,网站 (http://thechimeraproject.x10.mx) 是可以看到问题的地方。它位于按钮中,应该会慢慢发光。 如果你在 Chrome 上打开,必要的浏览器特定的东西,虽然写得很差,因为我正在学习 js,现在第三天,正在工作,所以 webkit 效果开始了。闪亮的。

你用 IE 做同样的事情,它也做同样的事情,除了明显的 PNG 透明度问题之外,一旦 FF 工作就会解决它。

你打开FF,就会有一个额外的效果,但有点无用。如果您打开它并将鼠标移出实际页面,您将看到灰色。如果将鼠标放在页面内,整个页面就会淡入视图。它正在执行悬停按钮 div 应该做的事情。由于该脚本通过使用“不透明度”类设置受影响的 div 来工作,因此我尝试从我的导航 div 中删除该类,以便该页面中没有任何内容具有“不透明度”作为类,但仍然会搞砸。将 (this) 替换为 ('.opacity') ,效果仍然相同。

大问题:为什么? 顺便说一句,是的,一切都一团糟,而且写得很糟糕。我学的是 C 编程,而不是 javascript,所以我要复制/粘贴很多东西,并使用基本的编程逻辑(和运气)来推动事情的发展。我将非常感谢有关编码的提示,但如果您开始这样做,您将列出一个很大的清单。

实际代码可以在第 118 行找到(创建淡入淡出的代码)。

Greetings.

I'm having a weird problem with jQuery on my website.

I'm trying to emulate webkit transitions on buttons, so that everyone gets the shiny stuff. And as I predicted from google searching, it is being a royal pain.

So, the website (http://thechimeraproject.x10.mx) is where the issue can be seen. It's in the buttons, which should slowly glow.
If you open on Chrome, the necessary browser specific stuff, although very poorly written, since I'm learning js as I go for... The third day now, is working, so the webkit effects start. Shiny.

You do the same with IE and it kinda does the same, with the exception of an apparent PNG transparency issue there, will get to it once FF is working.

You open up FF and you have an extra effect, and a kinda useless one. If you open it and keep your mouse out of the actual page, you'll see gray. If you put your mouse inside the page, the whole page fades into view. It's doing what the hover buttons divs should be. Since the script works by setting affected divs with the class "opacity", I've tried removing that class from my nav divs so that nothing in that page has "opacity" as a class, still screws up. Replaced (this) with ('.opacity') and still does the same.

Big question: Why?
By the way, yes, everything is a big mess and poorly written. I took C programming, not javascript, so I'm going copy/paste on a lot of things and using basic programming logic (and luck) to push things along. I'd be thankful for tips on the coding, but if you start on that you'll be making a big list.

The actual code can be found on line 118 (the one that creates the fading).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

等待圉鍢 2024-10-21 19:10:49

您的 html 元素应用了一个 opacity 类,这会导致执行悬停代码时整个页面淡出。我不确定为什么会发生这种情况,但您的页面有几个未关闭的标签和其他错误,这些错误总是会导致在浏览器之间不一致的奇怪问题。

以下是 HTML 上的验证器报告: http://validator.w3.org/check?uri=http%3A%2F%2Fthechimeraproject.x10.mx%2F&charset=%28detect+automatically%29& ;doctype=Inline&group=0

我将从这些错误开始,然后使用 Firebug 之类的工具来确定代码到底在哪里出错了(如果仍然如此)。

Your html element has a class opacity applied to it which is causing the entire page to be faded out when the hover code is executed. I'm not sure why this is occurring, but your page has several unclosed tags and other errors which can always cause weird issues that aren't consistent across browsers.

Here's the validator's report on your HTML: http://validator.w3.org/check?uri=http%3A%2F%2Fthechimeraproject.x10.mx%2F&charset=%28detect+automatically%29&doctype=Inline&group=0

I'd start with those errors and then use a tool like Firebug to determine where exactly the code is fouling up (if it still does).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文