一直試圖弄清楚如何刪除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>