如何阻止/冻结嵌入式Pinterest板以防止向下滚动? [英] How to block/freeze an embedded Pinterest board from scrolling down?

查看:128
本文介绍了如何阻止/冻结嵌入式Pinterest板以防止向下滚动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我嵌入了一个Pinterest板,该板占据了页面顶部的整个宽度.

我希望如果我向下滚动,页面本身直接向下滚动;而不是嵌入式Pinterest板.

我尝试了:

#pinterest-container > span {
    overflow: hidden;
}

但是面板仍然可以滚动.

我也尝试过使用javascript,但是不知为何它没有插入到我的html中.都不是:

var getThis = $('#pinterest-container > span:eq(0) > span:eq(1) > span:eq(0)');
$(getThis).css("overflow", "hidden");

否:

var getThis = $('#pinterest-container > span:eq(0) > span:eq(1) > span:eq(0)');
$(getThis).addClass("hide-overflow");

这是一个jsfiddle: https://jsfiddle.net/w57osokq/

有什么想法吗?

解决方案

此帖子向我展示了方式:

带有滚动条的Pinterest板的容器为<span class="PIN_xxxxx_bd" ...>.然后,需要以下CSS:

<style>
    #pinterest-container [class$=_bd] {
        overflow-y: hidden;
    }
</style>

I have a Pinterest board embedded, which is taking the complete width at the top of the page.

I want that if I scroll down, the page itself directly scrolls down; not the embedded Pinterest board.

I've tried with this:

#pinterest-container > span {
    overflow: hidden;
}

but the board is still scrollable.

I have also tried with javascript, but somehow it is not being inserted in my html. Neither:

var getThis = $('#pinterest-container > span:eq(0) > span:eq(1) > span:eq(0)');
$(getThis).css("overflow", "hidden");

nor:

var getThis = $('#pinterest-container > span:eq(0) > span:eq(1) > span:eq(0)');
$(getThis).addClass("hide-overflow");

And here a jsfiddle: https://jsfiddle.net/w57osokq/

Any idea of how to do it?

解决方案

This post showed me the way:

The container of the Pinterest board with the scrollbar is <span class="PIN_xxxxx_bd" ...>. Then, the following CSS is needed:

<style>
    #pinterest-container [class$=_bd] {
        overflow-y: hidden;
    }
</style>

这篇关于如何阻止/冻结嵌入式Pinterest板以防止向下滚动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆