Webkit将头部内容移动到正文,并增加了额外的空间? [英] Webkit moves head content to body, and adds extra space?

查看:130
本文介绍了Webkit将头部内容移动到正文,并增加了额外的空间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

看起来,Webkit将我所有的头标移动到身体上,并在身体之前添加了很多空白。当我查看源代码时,标签位于正确的位置。当我使用Chrome浏览器检查元素时,标记已移动。我怀疑它是Webkit,因为在Safari中发生的情况也是如此,但Opera和Firefox中都没有。我使用所有浏览器中的最新版本。



这是我的源代码开始,当我按下显示源代码时显示:

 <!DOCTYPE html PUBLIC -  // W3C // DTD XHTML 1.0 Strict // ENhttp://www.w3.org/TR/xhtml1/ DTD / XHTML1-strict.dtd> 

< html xmlns =http://www.w3.org/1999/xhtml>

< head>
< meta http-equiv =Content-Typecontent =text / html; charset = utf-8/>
< meta name =descriptioncontent =(Snip)/>

< title>(Snip)< / title>

< link rel =快捷图标href =favicon.ico/>

< link rel =stylesheettype =text / csshref =style / qtip.css/>
< link rel =stylesheettype =text / csshref =style / jquery-ui.css/>
< link rel =stylesheettype =text / csshref =style / new.css/>

< script type =text / javascriptsrc =javascript / ckfinder / ckfinder.js>< / script>
< script type =text / javascriptsrc =javascript / jquery.js>< / script>
< script type =text / javascriptsrc =javascript / jquery_easing.js>< / script>
< script type =text / javascriptsrc =javascript / jquery_custom.js>< / script>
< script type =text / javascriptsrc =javascript / typewatch.js>< / script>
< script type =text / javascriptsrc =javascript / ckeditor / ckeditor.js>< / script>
< script type =text / javascriptsrc =javascript / ckeditor / adapters / jquery.js>< / script>
< script type =text / javascriptsrc =javascript / slider.js>< / script>
< script type =text / javascriptsrc =javascript / script.js>< / script>
< script type =text / javascriptsrc =javascript / qtip.js>< / script>
< script type =text / javascriptsrc =javascript / swfobject.js>< / script>
< / head>

< body>
< div id =wrapper_ext>
< a id =wallpaper_toggle>< / a>
...

以下是DOM分析器的屏幕截图:



我最初怀疑是Javascript,但我禁用了所有的Javascript,并发生同样的事情。然而,这只发生在我的一些页面上,所以我不知道实际原因。我正在寻找这样的问题的可能原因

解决方案

我删除了字节顺序掩膜(BOM)从我的文件,它的工作。
我应该将此报告为webkit的bug吗?


It seems Webkit moves all my head tags to the body, and adds a lot of whitespace before the body. When I look at the source, the tags are in the right place. When I inspect the elements using the Chrome browser, the tags have been moved. I suspect it's Webkit because the same happened in Safari, but not in Opera or Firefox. I use the latest of all browsers.

Here is my source code start, as appears when I press "Show Source":

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="description" content="(Snip)" />

    <title>(Snip)</title>

    <link rel="shortcut icon" href="favicon.ico" />

    <link rel="stylesheet" type="text/css" href="style/qtip.css" />
    <link rel="stylesheet" type="text/css" href="style/jquery-ui.css" />
    <link rel="stylesheet" type="text/css" href="style/new.css" />

    <script type="text/javascript" src="javascript/ckfinder/ckfinder.js"></script>
    <script type="text/javascript" src="javascript/jquery.js"></script>
    <script type="text/javascript" src="javascript/jquery_easing.js"></script>
    <script type="text/javascript" src="javascript/jquery_custom.js"></script>
    <script type="text/javascript" src="javascript/typewatch.js"></script>
    <script type="text/javascript" src="javascript/ckeditor/ckeditor.js"></script>
    <script type="text/javascript" src="javascript/ckeditor/adapters/jquery.js"></script>
    <script type="text/javascript" src="javascript/slider.js"></script>
    <script type="text/javascript" src="javascript/script.js"></script>
    <script type="text/javascript" src="javascript/qtip.js"></script>
    <script type="text/javascript" src="javascript/swfobject.js"></script>
</head>

<body>
            <div id="wrapper_ext">
            <a id="wallpaper_toggle"></a>
            ...

And here is a screenshot of the DOM analyser:

I suspected Javascript at first, but I disabled all Javascript and the same thing occurs. Yet, this only occurs on some of my pages, so I don't know the actual cause. I'm looking for possible causes of such a problem.

解决方案

I removed the Byte-Order Mask (BOM) from my file, and it worked. Should I report this as a bug to webkit?

这篇关于Webkit将头部内容移动到正文,并增加了额外的空间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆