0
我正在開發一個網站,我想使用Facebook評論插件,並且我想自定義評論的CSS。我正在使用ASP.NET MVC
體系結構,我的頁面要求通過ViewData發送fb:comments的href。由於這個原因,我使用javascript將我的Facebook評論標籤添加到我的頁面中的div上。定製Facebook評論
我試圖參照 http://www.daddydesign.com/wordpress/how-to-customize-the-facebook-comments-social-plugin-on-a-static-fbml-tab/ 到自定義CSS
但似乎由CSS
沒有被應用到我的Facebook評論部分。
的代碼如下:
<script type="text/javascript">
$(function() {
Url = '<%=ViewData["Url"] %>';
Xid = '<%=ViewData["Xid"] %>';
document.getElementById('fb_comments')
.innerHTML = "<fb:comments href="
+ Url
+"num_posts=\"4\" xid="
+ Xid + " width=\"350\"></fb:comments>";
});
</script>
<style type="text/css">
#fb_comments {
width: 350px;
float: left;
font-family: Arial, Helvetica, sans-serif;
color: #909090;
min-height:850px;
height:100%;
background-color: #E8E8E8;
}
#fb_comments a {
color: #909090;
}
</style>
</head>
<body style="width:350px;">
<div>
<div id="fb-root">
</div>
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1">
</script>
<div id="fb_comments">
</div>
</div>
</body>
</html>
能有人請幫助!
謝謝!