Try not to trigger excessive style re-calc

This commit is contained in:
2016-06-24 17:56:26 +08:00
parent 18bcb8a81e
commit 8f78202f75
2 changed files with 2 additions and 2 deletions

View File

@@ -243,7 +243,7 @@
{
var p = wsupp.scrollTop / ( wsupp.scrollHeight - wsupp.clientHeight );
cp = 0.75 * cp + 0.25 * p;
bWrapper.style.backgroundPosition = "50% " + cp * 100 + "%";
bWrapper.style.backgroundPosition = "50% " + ( cp * 100 ).toFixed( 2 ) + "%";
}
, 15
);