我有一个带有 Facebook Like 按钮的简单 html 页面:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:og="http://opengraphprotocol.org/schema/">
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<body>
<div id="fb-root"></div>
<script type="text/javascript">
window.fbAsyncInit = function() {
FB.init({
status: true, // check login status
cookie: true, // enable cookies to allow the server to access the session
xfbml: true, // parse XFBML
channelURL: 'http://myurl.com', // channel.html file
oauth: true // enable OAuth 2.0
});
};
(function(d) {
var js, id = 'facebook-jssdk'; if (d.getElementById(id)) { return; }
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
d.getElementsByTagName('head')[0].appendChild(js);
} (document));
</script>
<fb:like href="http://myurl.com" layout="button_count" show_faces="false" width="450" height="35" action="like" colorscheme="light" font="trebuchet ms" allowTransparency="true"></fb:like>
</body>
</html>
如何 Conceal 按钮旁边的计数器?
非常感谢!
最佳答案
使用 Facebook 提供的 iframe 代码 http://developers.facebook.com/docs/reference/plugins/like然后将其包装在一个具有高度和宽度的 div 中,并 Conceal 溢出。
关于javascript - Conceal Facebook Like 按钮上的计数器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7596286/