jQuery 灯箱在 IE 中不起作用

发布于 2024-11-29 02:37:08 字数 335 浏览 3 评论 0原文

看看这个网站,http://www.uniquegeeks.co .uk/product/test-LED%20Lights-0001#,请找出为什么它在除 IE 之外的所有其他浏览器中都能完美运行。

  1. 问题在于,在 IE 中,网站位于左侧,而其他所有浏览器都应该在中间。

    问题
  2. 当您在非 IE 浏览器中单击较大的图像时,它就是一个工作灯箱。在 IE 中它不起作用,只显示下面的大图片。

Take a look at this site, http://www.uniquegeeks.co.uk/product/test-LED%20Lights-0001#, and please work out why it works perfectly in every other browser but IE.

  1. The problem is that in IE the site is off to the left and every other browser it's as it should be, in the middle.

  2. When you click the larger image in a non IE browser, it's a working lightbox. In IE it doesn't work and just shows the large picture underneath.

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

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

发布评论

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

评论(3

独木成林 2024-12-06 02:37:08

顺便说一句:

<div id="wrapper">
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

不是有效的 HTML。

As an aside:

<div id="wrapper">
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

is not valid HTML.

趁年轻赶紧闹 2024-12-06 02:37:08

这是因为它在怪异模式下运行(如果您在 IE 中按 F12,您会看到“文档模式”默认为怪异模式)。
设置一个文档类型,例如:

<!doctype html> 

确保它默认为 IE9(或它实际是什么版本)

It's due to it operating in quirks mode (if you press F12 in IE you'll see the 'document mode' defaults to quirks).
Set a doctype like:

<!doctype html> 

To ensure it defaults to IE9 (or whatever version it actually is)

黎夕旧梦 2024-12-06 02:37:08

我认为这里的主要问题是您的

由于某种原因被带到了 html 的顶部。只有当我查看源代码、通过调试器工具查看 html 时,我才会看到这一点,即 div 正确放置在 body 标记之后。

I think the main problem here is that your <div id="wrapper"> is being carried to the top of your html for some reason. I only see this if I view source, if I view html through debugger tools that div is placed correctly after the body tag.

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