小智 54
如果你这样做,overflow:hidden
那么请记住它也会隐藏XFBML版本中出现的评论框...用户喜欢它之后.如果你这样做最好......
/* make the like button smaller */
.fb_edge_widget_with_comment iframe
{
width:47px !important;
}
/* but make the span that holds the comment box larger */
span.fb_edge_comment_widget.fb_iframe_widget iframe
{
width:401px !important;
}
Run Code Online (Sandbox Code Playgroud)
The*_*can 42
编码显示"推荐"的Like按钮宽度为84px,"喜欢"按钮为44px,这样可以为像我这样需要隐藏我的页面当前不受欢迎的CSS人员节省一些时间!我把这个代码放在我的主页上,所以最初我不希望它宣传我喜欢的Likes数量.
小智 10
只是在div中包含iframe,将宽度设置为按钮的宽度,将overflow设置为隐藏即ie
<div style="width:52px;overflow:hidden;">
<fb:like layout="button_count"></fb:like>
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({
appId: 'YOUR_APP_ID',
status: true,
cookie: true,
xfbml: true
});
};
(function() {
var e = document.createElement('script');
e.type = 'text/javascript';
e.src = document.location.protocol +
'//connect.facebook.net/en_US/all.js';
e.async = true;
document.getElementById('fb-root').appendChild(e);
}());
</script>
</div>
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
147071 次 |
最近记录: |