因此,我尝试在window.pageYOffset
事件的页面上为某个容器添加当前marginTop
值作为onclick
值。但它不会发生。
我还想承认,将window.pageYOffset
的正值添加到marginTop
没有问题。
这是我的代码:
let a = window.pageYOffset;
const rightColumn = document.querySelector('.right-side__column');
rightColumn.style.marginTop = '-' + a + 'px'; // in such way a in
// padding even equal to 0.
// rightColumn.style.marginTop = a + 'px'; - work fine, the value is transfer normally.
答案 0 :(得分:0)
请尝试使用 Flux<StandardEntity> results = Flux.from(
mongoCollectionManager.getCollection(channel)
.find( and(gte("lastUpdated", begin), lte("lastUpdated", end))))
.map(d -> new StandardEntity(d.getString("price"), d.getString("lastUpdated")));
Long lastIndex = results
.count()
.block();
final double standardPage = 10.0D;
final double step = lastIndex / standardPage;
final double[] counter = {0.0D};
return
results
.take(1)
.mergeWith(
results
.skip(1)
.filter(e -> {
if (lastIndex > standardPage)
if (counter[0] >= step) {
counter[0] = counter[0] - step + 1;
return true;
} else {
counter[0] = counter[0] + 1;
return false;
}
else
return true;
}));
。