[英]How to autoscroll facebook page plugin iframe
This is the iframe where I want to implement the auto-scrolling feature.这是我要实现自动滚动功能的 iframe。 <iframe src="https://www.facebook.com/plugins/page.php?href=https%3A%2F%2Fwww.facebook.com%2Fpage_name%2F&tabs=timeline&width=500&height=500&small_header=true&adapt_container_width=true&hide_cover=true&show_facepile=true&appId=---" width="500" height="400" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowfullscreen="true" allow="autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share"></iframe>
<iframe id="preview" onLoad="scrollToBottom()"></iframe>
function scrollToBottom() {
window.scrollTo(0, document.body.scrollHeight);
}
$('#preview').contents().scrollTop($('#preview').contents().height());
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.