HTML5 通过 W3C 验证(在 Chrome、Firefox、Safari 中工作) IE8 中的黑屏

发布于 2024-09-28 18:54:13 字数 344 浏览 0 评论 0原文

晚安大家。

我创建了一个基本的 HTML5 网站。它在 W3C 验证器中进行验证。它似乎在 Chrome、Safari、Firefox 等中运行良好。但是,在 IE8 中打开页面时,我只是看到黑屏。

该网站可以在 www.soultrainer.co.uk 找到

,我以为我错过了一个括号或某物。但是我在错误控制台中收到 0 条错误消息,并且查看代码我看不到任何错误。

任何帮助将不胜感激。

PS我还可以在IE8开发者工具中查看文档树。

谢谢,
加里

Evening all.

I have created a basic HTML5 site. It validates in W3C validator. It seems to work fine in Chrome, Safari, Firefox etc. However, upon opening the page in IE8 I just get a black screen.

The site can be found at www.soultrainer.co.uk

I assumed I had missed a bracket out or something. However I am receiving 0 error messages in error consoles and looking through the code I can't see any errors.

Any help would be greatly appreciated.

P.S. I can also view the document tree in IE8 Developer Tools.

Thanks,
Gary

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

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

发布评论

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

评论(3

九局 2024-10-05 18:54:13

如果您查看 IE 如何决定使用开发人员工具解析该页面,您会发现它会将所有内容放入头部,而将正文留为空节点。

这是因为你打开了你的头,但永远不会关闭它;)删除打开的头(以及没有开口的关闭的身体)应该解决这个问题,如果没有,只需将头部内容包含在 head 中,将主体内容包含在 body 中: )

一个有用的工具(仍然不是 100% 完美)是 HTML Lint 工具。它不喜欢您当前的结构,但是如果我将其复制到“Lint By Direct Input”选项卡中,并删除 head 和 /body 标记,那么就可以了:)

If you look at how IE has decided to parse this page using the developer tools, it's put everything into the head, and left the body an empty node.

This is because you open your head, but never close it ;) Removing the opening head (and also your closing body which has no opening) should sort this out, if not, just encase head content in head, and body content in body :)

A useful tool (still not 100% perfect) is the HTML Lint tool. It doesn't like your current structure, however if I copy it into the "Lint By Direct Input" tab, and remove the head and /body tag, then it's fine :)

辞取 2024-10-05 18:54:13
    #overlay{
        position:absolute;
        top:0px;
        left:0px;
        width:100%;
        height:100%;
        background-color:rgba(0,0,0,0.8);           
    }

也许是这个?尝试注释某些内容并进行测试。您可以轻松找出它是什么。

你似乎也有用于 body bg 图像的 CSS3 东西。尝试将这些内容注释掉,也许 IE 无法正确解析它。

    #overlay{
        position:absolute;
        top:0px;
        left:0px;
        width:100%;
        height:100%;
        background-color:rgba(0,0,0,0.8);           
    }

Maybe it's this? Try commenting certain stuff out and testing. You can easily find out what it is.

You seem to have CSS3 stuff for the body bg image as well. Try commenting that stuff out, maybe IE can't parse it properly.

一生独一 2024-10-05 18:54:13

您缺少顶部的开始 html 标记。

You're missing the opening html tag at the top.

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