问题
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