javascript facebook 喜欢和发送按钮弹出方向
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6394078/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
facebook like & send button flyout direction
提问by Ryan Teuscher
How can I set the direction of the facebook "flyout" on the like or send button. We currently float our facebook social plugins on the right side of the page. But, when someone opens the facebook "flyout" it opens right, expanding the page when ideally it would open to the left.
如何在喜欢或发送按钮上设置 facebook“飞出”的方向。我们目前在页面右侧浮动我们的 facebook 社交插件。但是,当有人打开 facebook “flyout”时,它会向右打开,在理想情况下它会向左打开时扩展页面。
Example: http://compfight.com
示例:http: //compfight.com
I promise, we don't need you to like the site:) Any help would be greatly appreciated.
我保证,我们不需要你喜欢这个网站:) 任何帮助将不胜感激。
<div class="side-right">
<fb:like href="http://compfight.com" send="true" layout="button_count" width="150" show_faces="false" action="recommend" font="" class=" fb_edge_widget_with_comment fb_iframe_widget">
</div>
The class side-right has a float:right; and text-align:right attached to it.
类 side-right 有一个 float:right; 和 text-align:right 附加到它。
回答by Andrew
Try adding this style to your page:
尝试将此样式添加到您的页面:
<style>
.fb_edge_widget_with_comment span.fb_edge_comment_widget {
left: -300px !important;
}
</style>
回答by Gareth
You can HIDE the flyout if need be, as in Firefox where the flyout can push the content out of position (we had a LIKE button in a jQuery slider in a sidebar, and each LIKE clicked was pushing the sidebar image out of the frame.
如果需要,您可以隐藏浮出控件,如在 Firefox 中,浮出控件可以将内容推出位置(我们在侧边栏中的 jQuery 滑块中有一个 LIKE 按钮,每次点击 LIKE 都会将侧边栏图像推出框架。
Using Andrew's CSS from the post above, I found that a simple display:nonedid the trick.
使用上面帖子中 Andrew 的 CSS,我发现一个简单的display:none成功了。
<style>
.fb_edge_widget_with_comment span.fb_edge_comment_widget {
left: -300px !important;
display:none;
}
</style>
That precented our content from being forced upwards and out of frame.
这使我们的内容不会被强制向上和超出框架。
回答by Gareth
No support for this at the moment as everything is within an iframe and out of your app's control.
目前不支持这一点,因为一切都在 iframe 内,不受您的应用程序控制。
Subscribe to the official bug to get updates on the issue:
订阅官方错误以获取有关该问题的更新:
回答by Jaroslav ?treit
I just added fb like to div with overflow:hidden...
我刚刚添加了 fb like to div with overflow:hidden ...
Add comment to your like is not so important to destroy your web design, you want that like, comment is just bonus ;-)
添加评论对您的喜欢并没有那么重要以破坏您的网页设计,您想要那个喜欢,评论只是奖励;-)
回答by Nicola De Lazzari
does not do it automatically?
不会自动执行吗?
example with
示例与
.fb-like { float:right; }
回答by Thomas Welton
You can't customize the location of the fly out window but see my alternative here. Facebook send button flyout
您无法自定义飞出窗口的位置,但请在此处查看我的替代方案。 Facebook 发送按钮弹出