简体   繁体   English

load77.exelator.com/pixel.gif在页脚下方引起空白

[英]load77.exelator.com/pixel.gif is causing a white space below the footer

Recently I observed that an image is added dynamically to the site through a script .This is creating a white space beneath the footer. 最近我观察到图像是通过script动态添加到站点的,这在页脚下方创建了一个空白区域。

Code being added dynamically is : 动态添加的代码是:

<script type="text/javascript" async="">
    var xl8image = document.createElement("img"); 
    xl8image.src = "http://load77.exelator.com/pixel.gif"; 
    xl8image.width="0"; 
    xl8image.height="0"; 
    document.body.appendChild(xl8image);
</script>

My initial doubts were on chrome extensions I use. 我最初的疑问是我使用的Chrome扩展程序。 When I tested removing extensions, I found that is still there! 当我测试删除扩展程序时,我发现它仍然存在! Also made sure if it is happening in other browsers like IE, Firefox. 还要确保它是否在其他浏览器(例如IE,Firefox)中发生。

Can anyone help me find about removing the white space? 谁能帮助我找到有关删除空白的信息? My solution does not have this file nor its reference. 我的解决方案没有此文件或其参考。

Make the element absolutely positioned using position: absolute to remove it from the normal document flow. 使用position: absolute将元素绝对定位,以将其从常规文档流中删除。 This will stop it from causing a gap on your page. 这将阻止它引起页面空白。

New code: 新代码:

<script type="text/javascript" async="">
  var xl8image = document.createElement("img");
  xl8image.src = "http://load77.exelator.com/pixel.gif";
  xl8image.width = "0";
  xl8image.height = "0";
  xl8image.style.position = "absolute"; //add this
  document.body.appendChild(xl8image);
</script>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM