一直试图弄清楚如何删除iframe叽叽喳喳小部件中的滚动条。我知道我不能用CSS做,所以我的下一个表情是用jQuery试过以下,但似乎并没有工作Twitter的iframe小部件删除滚动条
$("iframe").ready(function() {
$(".stream", this).css("overflow-x", "hidden");
});
一直试图弄清楚如何删除iframe叽叽喳喳小部件中的滚动条。我知道我不能用CSS做,所以我的下一个表情是用jQuery试过以下,但似乎并没有工作Twitter的iframe小部件删除滚动条
$("iframe").ready(function() {
$(".stream", this).css("overflow-x", "hidden");
});
您可以使用CSS来禁用它。我用在(https://github.com/kevinburke/customize-twitter-1.1)此插件覆盖了twitter CSS和然后刚添加:
.timeline .stream {overflow:hidden;}
我也通过直接将相同的CSS到Twitter的widget.js(的本地存储副本围绕线30隐藏滚动条)。
简单的解决方案
设置滚动属性没有在你的iframe标签。像这样:
scrolling="no"
完全IFRAME例如:
<iframe scrolling="no" title="Twitter Tweet Button" style="border:0;overflow:hidden;" src="https://platform.twitter.com/widgets/tweet_button.html" height="28px" width="76px"></iframe>