2 ms·
This app has nude images but I solved the "stupid rubber-band scrolling problem" be setting the <html> and <body> tags to fixed position.[1] I just wanted to sh
by zappo2938 10y ago
This app has nude images but I solved the "stupid rubber-band scrolling problem" be setting the <html> and <body> tags to fixed position.[1] I just wanted to share an example of this working in the wild and I only discovered it last week. I'm using Angular Material Design with a <md-content> tag which has overflow: auto and position: relative. This creates a scrolling bar inside of the fixed position body. It also creates some pretty weird side effects because HTMLElement.offsetTop remains static so none of the smooth scrolling JavaScript libraries work, so I had to role my own with a scrollToTop method.[2] I think it is because HTMLElement.offsetTop is computed relative to the parent which is fixed.
When it comes to scrolling two images they are jigging because the browser is handling the repainting instead of passing it off to the graphics card or chip. The only way to have smooth scrolling is to use translateX or translateY.
(Note: I don't know what I'm talking about and honest I just don't care.)
[1] https://github.com/adam-s/playboy-fm/blob/master/client/sass/app.scss https://github.com/adam-s/playboy-fm/blob/master/client/sass...
[2] https://github.com/adam-s/playboy-fm/blob/master/client/public/scripts/states/battle/battle.ctrl.js https://github.com/adam-s/playboy-fm/blob/master/client/publ...