【问题标题】:Tweet button iframe size 107px推文按钮 iframe 大小 107px
【发布时间】:2012-12-10 14:43:59
【问题描述】:

我正在尝试让推特按钮从 twitter 工作,但代码生成的 iframe 默认情况下总是给我 107px 的宽度...我希望 iframe 的大小根据按钮进行更改实际大小...我可以通过 css 更改它,但给它一个宽度大小的 auto 不起作用...

谢谢大家

【问题讨论】:

    标签: html iframe twitter share


    【解决方案1】:

    您可以在一定程度上控制 iFrame 中 Twitter 按钮的呈现。您可以在调用中添加size 属性,它会为您提供几个可供选择的尺寸版本。

    例如:

    <iframe allowtransparency="true" frameborder="0" scrolling="no"
            src="https://platform.twitter.com/widgets/tweet_button.html?size=medium"
            style="width:130px; height:20px;"></iframe>
    

    尺寸为中号、大号

    完整参考请参阅Tweet Button documentation

    另外,因为它是poorly documented。有关向推文按钮的 iFrame 版本添加参数的帮助,请参阅 Twitter 开发人员倡导者的 this note

    类似,看这里How can I change Twitter's Share button height?

    【讨论】:

    • 要获得大尺寸,size=large 不适合我,但size=l(小写“L”)可以。
    猜你喜欢
    • 2012-08-03
    • 2015-07-19
    • 2013-06-01
    • 2016-05-27
    • 2012-05-22
    • 2012-04-24
    • 2011-12-08
    • 1970-01-01
    • 2012-09-20
    相关资源
    最近更新 更多