本文介绍了Facebook Like Button会在Chrome上按回到浏览器并屏蔽页面内容后渲染1000px * 1000px的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在页面的标题上实现了类似按钮的html5版本。
一旦我导航到另一个页面,并按浏览器上的后退按钮FB按钮渲染iframe大小为1000px * 1000px并掩盖页面内容。

I implemented html5 version of the like button on the header of my page.once i navigate to another page and press the back button on the browser the FB button renders the iframe the size of 1000px * 1000px and masks the page content.

这个的任何解决方案?这是一个已知的问题?

any solutions for this ? is this a known issue?

推荐答案

我可以确认这是发生在我自己以及多个网站。

I can confirm this is happening for myself as well across multiple sites.

Facebook知道可能需要一些时间才能根据

Facebook is aware of the issue which may take some time to fix according to https://developers.facebook.com/x/bugs/663421210369743/

在短期内,许多其他开发人员似乎建议专门针对iframe通过css(或超时的JavaScript调用)强制高度回到大约20px。

In the short-term, many other developers seems to be suggesting to target the iframe specifically through css (or timeout javascript call) to force the height back to about 20px.

使用css时,确保你使用!重要的是覆盖最后的样式属性来自Facebook的iframe。

When using css, ensure you use !important to override the style attribute that ends up on the iframe from facebook.

这篇关于Facebook Like Button会在Chrome上按回到浏览器并屏蔽页面内容后渲染1000px * 1000px的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-03 07:22