最近搜索
没有最近搜索

Martijn Schoenmaker
已加入2021年5月28日
·
最后活动2021年10月27日
关注
0
关注者
0
活动总数
2
投票
0
订阅
1
活动概览
标记
文章
帖子
社区评论
文章评论
活动概览
的最新活动 Martijn Schoenmaker
Martijn Schoenmaker 进行了评论,
社区评论 Discussion - Tips and best practices from the community
I'm not sure if it's already mentioned, but the downside of using this technique is the DOM being altered after the first draw. Another way to tackle this is setting display: none on the nth element using css. So eg:
.a.article-list-link:nth-child(n+5) {
display: none;
}
This piece of code adds "display: none;" to the 5th element and up. That way the DOM is rendered correctly at once!
EDIT: I just noticed that the comment above me already provided this answer. I will keep this one just so that people will notice.
查看评论 · 已于 2017年11月29日 发布 · Martijn Schoenmaker
0
关注者
0
投票
0
评论