1

HTML,将 CSS 设置为 localhost 上的文件:

<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
<fb:like-box href="http://www.facebook.com/pages/abc/143772917800992?created" width="200" height="550" show_faces="true" stream="false" header="false" css="http://localhost/abc/templates/index/images/fb.css?1" >
</fb:like-box>

CSS:

@charset "utf-8";
/* CSS Document */
.fan_box a:hover{
  text-decoration: none;
}
.fan_box .full_widget{
  height: 200px;
  border: 0 !important;
  background: none !important;
  position: relative;
}
.fan_box .connect_top{
  background: none !important;
  padding: 0 !important;
}
.fan_box .profileimage, .fan_box .name_block{
  display: none;
}
.fan_box .connect_action{
  padding: 0 !important;
}
.fan_box .connections{
  padding: 0 !important;
  border: 0 !important;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  font-weight: bold;
  color: #666;
}
span.total{
  color: #FF6600;
  font-weight: bold;
}
.fan_box .connections .connections_grid {
  padding-top: 10px !important;
}
.fan_box .connections_grid .grid_item{
  padding: 0 10px 10px 0 !important;
}
.fan_box .connections_grid .grid_item .name{
  font-family: "lucida grande",tahoma,verdana,arial,sans-serif;
  font-weight: normal;
  color: #666 !important;
  padding-top: 1px !important;
}
.fan_box .connect_widget{
  position: absolute;
  bottom: 0;
  right: 10px;
  margin: 0 !important;
}
.fan_box .connect_widget .connect_widget_interactive_area {
  margin: 0 !important;
}
.fan_box .connect_widget td.connect_widget_vertical_center {
  padding: 0 !important;
}

Facebook 似乎没有加载 CSS 文件。有什么问题?

4

3 回答 3

1

Facebook 已撤回此选项。现在您不能将任何此类 css 文件添加到您的喜欢框或粉丝框中。自 2013 年 1 月 24 日以来,它已停止在任何地方工作。

于 2013-01-26T14:54:54.920 回答
1

CSS 不能从 localhost 加载,因为 Facebook 需要从他们的服务器加载(和缓存)它。也就是说,它需要位于他们的服务器可以访问的地方。

于 2012-03-27T17:27:10.203 回答
0

因为风扇框是 iframe,并且 iframe 不能从 parant 文档中设置样式。asfaik facebook 不想让您自定义此设计以保持 ci 一致,但是您可以使用倒色版本和其他一些字体。

于 2011-09-28T08:57:07.427 回答