https://developer.mozilla.org/en-US/docs/Web/API/element.scrollHeight?redirectlocale=en-US&redirectslug=DOM%2Felement.scrollHeight :
"This property will round the value to an integer. If you need a fractional value, use element.getBoundingClientRect()."
Except ... "element.getBoundingClientRect ()" does not return scrollHeight. How to get fractional scroll? Is it possible?
I think I might have a solution:
var rect = element.getBoundingClientRect() var scrollHeight = element.scrollHeight + (parseInt(rect.height) - rect.height) var scrollWidth = element.scrollWidth + (parseInt(rect.width) - rect.width)
Source: https://habr.com/ru/post/1526083/More articles:cakephp configure :: read value lost 'try constant, same behavior - cakephpImport bootstrap theme - cssCakePHP Route Prefix - cakephpHow does the beforeShowDay method work? (JQuery UI datepicker) - javascriptHow to save a link to a function so that I can return it later in the node.js C ++ add-ons module? - c ++Затухание изображения с помощью JavaScript (НЕ JQuery!) - javascriptWhat types of objects should be stored as variables in JavaScript? - javascriptЧисло в f (93) в ряду фибоначчи имеет отрицательное значение, как? - javaМожно ли выбрать параметр выбора стиля CSS в раскрывающемся меню? - javascriptGreek characters in ggplot2: geom_boxplot - rAll Articles