R
R
Rastishka2017-11-14 15:31:44
css
Rastishka, 2017-11-14 15:31:44

What is the correct way to use will-change: scroll-position?

For a mobile app (cordova), what is the correct way to use will-change: scroll-position for long lists (chat messages)? For the container or for the elements?

<div class='container'>
  <div class="child">Ololo</div>
  <div class="child">Ololo</div>
  <div class="child">Ololo</div>
</div>

Option A: Option B: Option C :
.container {will-change: scroll-position}
.child {will-change: scroll-position}
.container {will-change: scroll-position}
.child {will-change: transform}

Or some other way?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Egor Zhivagin, 2017-11-14
@Rastishka

A.
I'm far from mobile development, but I still don't quite understand why put it in will-change ?) And what does the child elements have transform too. I would be grateful for an explanation.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question