How to block/freeze an embedded Pinterest board from scrolling down?

随声附和 提交于 2019-12-25 09:35:49

问题


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?


回答1:


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>


来源:https://stackoverflow.com/questions/44630077/how-to-block-freeze-an-embedded-pinterest-board-from-scrolling-down

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!