【发布时间】:2011-10-15 00:41:20
【问题描述】:
我想使用Facebook like button,但没有计数。我尝试将其容器的宽度设置为 47px,没有溢出。这适用于 Windows 上的浏览器,但在 Mac OS X 上,按钮的宽度似乎扩展为 49 像素,因此它的一部分被切断了。
有没有人知道使用 Like 按钮的方法,具有 button_count 样式,但没有 count 并且它在 Windows 和 Mac 上的显示方式不同?
这是我用于 Facebook 按钮的代码:
<script type="text/javascript">
//<![CDATA[
//Facebook like button
window.fbAsyncInit = function() {
FB.init({xfbml: true});
};
//]]>
</script>
<div id="fb-root"></div>
<fb:like href="{{ page_url }}" send="false" layout="button_count" width="49" height="21" show_faces="false"></fb:like>
<script type="text/javascript">
(function() {
var e = document.createElement('script');
e.async = true;
e.src = (document.location.protocol == 'file:' ? 'http:' : document.location.protocol) + '//connect.facebook.net/en_US/all.js';
document.getElementById('fb-root').appendChild(e);
}());
</script>
【问题讨论】:
标签: button facebook-like social-media