Hi intresting moment which i didnt find in google.
How i can scroll to vertical center with flex reverse ?
Problem in example:
i have temp1.scrollHeight = 1000
but in top position of scroll property temp1.scrollTop return '-940' (not -1000)
i think it calculate how scrollHeight-minus scrollbar element height:
How i can center scroll?
like: scrollHeight / 2 - (hight if scrollbar element / 2);
Find this API in MDN: https://developer.mozilla.org/zh-CN/docs/Web/API/Element/scrollIntoView
Element.scrollIntoView(scrollIntoViewOptions)
params: scrollIntoViewOptions = { block: 'center', } // vertical alignment center