我注意到 Google 的再营销代码会在我的页面底部插入一个 iframe。问题是 iframe 弄乱了我的布局(它的高度为 13 像素,并且在底部留下了空白的白色垂直空间)。
我尝试用 css 隐藏它,但它在 IE9 中仍然可见:
iframe[name='google_conversion_frame'] {
height: 0 !important;
line-height: 0 !important;
font-size: 0 !important;
}
因此我有两个问题:
a) 如何在 IE9 中隐藏此 iframe
b)最重要的是 - 它安全吗?或者它会以某种方式影响该脚本的功能吗?
在我的网站中我使用这个代码
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 内主体高度的负边距。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)