Google再营销代码 - iframe高度问题 [英] Google remarketing tag - iframe height issue
问题描述
我注意到Google的再营销代码会在页面底部插入一个iframe。问题是iframe弄乱了我的布局(它高13px并在底部留下一个空白的垂直空间)。
I've noticed that Google's remarketing code inserts an iframe at the bottom of my page. The problem is that the iframe messes up my layout (it's 13px high and leaves a blank white vertical space at the bottom).
我试图用css隐藏它但它在IE9中仍然可见:
I've tried to hide it with css but it's still visible in IE9:
iframe[name='google_conversion_frame'] {
height: 0 !important;
line-height: 0 !important;
font-size: 0 !important;
}
因此我有两个问题:
a)如何在IE9中隐藏这个iframe
a) how to hide this iframe in IE9
b)最重要的是 - 它是安全的还是会以某种方式影响这个脚本的功能?
b) most importantly - is it safe or can it somehow affect the functionality of this script?
推荐答案
在我的网站中,我使用此代码
In my sites i use this code
iframe[name='google_conversion_frame'] {
height: 0 !important;
width: 0 !important;
line-height: 0 !important;
font-size: 0 !important;
margin-top: -13px;
float: left;
}
浮动iframe允许你使用等于身体高度的负边距在iframe内部。
Floating the iframe allows you to use negative margin equal to the height of the body inside the iframe.
这篇关于Google再营销代码 - iframe高度问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!