【问题标题】:Like box image witdh像框图像宽度
【发布时间】:2011-11-21 11:00:24
【问题描述】:

我在网站上添加了一个类似 iframe 的框:www.apf.no

但是有些图片不成比例,我该如何覆盖这段代码?

.connect_widget .page_stream img {     
   max-width: 120px; 
}

感谢凯西莉亚

【问题讨论】:

    标签: css facebook-social-plugins facebook-iframe


    【解决方案1】:

    我终于使用以下代码将图像恢复到正确的宽度:

    <script type="text/javascript" src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/en_US"></script> 
    <script type="text/javascript">FB.init("");</script> 
    <fb:fan profile_id="ID_OF_PAGE_HERE" stream="1" connections="20" width="600px" height="500px" header="1" logobar="0"  css="WEBSITE_URL_HERE/css/facebook.css?17"></fb:fan>
    

    CSS 是:

    a.largePhoto img.img {
        max-width: 300px !important;
        width: 300px !important;
    }
    

    请记住每次更新 CSS 时都在 .css?17 中添加一个,以防止使用 CSS 的缓存版本。

    【讨论】:

      【解决方案2】:

      您需要使用较旧但仍受支持的风扇框才能添加您自己的自定义样式表,然后您可以使用任何您喜欢的样式,包括覆盖“最大宽度”

      查看这些帖子了解更多详情:

      http://www.speckygeek.com/how-to-add-facebook-like-box-to-your-website/

      http://www.daddydesign.com/wordpress/how-to-customize-your-facebook-fan-box/

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2016-08-02
        • 1970-01-01
        • 2012-04-25
        • 2017-11-01
        • 2015-04-26
        • 2013-06-20
        • 1970-01-01
        相关资源
        最近更新 更多