在某些页面上,Twitter 分享按钮未显示其全宽。我已经追踪了问题,显示它的 iframe 仅设置为 24px 宽度,但是我需要将其设置为正确的宽度。问题是..我无法直接访问 iframe,因为这是插入它的代码:
<div style="margin:4px 0 0 5px; float:left; position: relative;"><a href="https://twitter.com/share" class="twitter-share-button" data-count="none">Tweet</a></div>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</div><!-- END #socialNetworking -->
<script>
有人知道我如何编辑 iframe 吗?生成的 HTML 不显示 iframe,但是在 chrome web 开发工具上挖掘 html 检查器,我可以在那里看到它:
<iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://platform.twitter.com/widgets/tweet_button.1347008535.html#_=1347624904492&count=none&id=twitter-widget-0&lang=en&original_referer=http%3A%2F%2Fwww.dgfdg.co.uk%2F&size=m&text=Web%20Design%20Kendal%20%7C%20Website%20Design%20Cumbria%20%7C%20Graphic%20Design%20%7C%20Marketing%20%7C%20Advertising%20%7C%20Designworks%20%7C&url=http%3A%2F%2Fwww.fdfdg.co.uk%2F" class="twitter-share-button twitter-count-none" style="width: 24px; height: 20px; " title="Twitter Tweet Button" data-twttr-rendered="true"></iframe>