- This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
I have a spinner / loader on my site. At the moment it set to 100% width and 100% height however if I have scrolled to a different part on the page and i click “activate” the spinner background is still only the height and width of the screen and appears at the top of the page.
https://codepen.io/iperez_genius/pen/mxPPwb
I know I have top: 0 in the loaderWrapper class however changing this has done nothing.
I would do it like this: https://codepen.io/anon/pen/LdNXqZ/
Unfortunately that didn’t do the trick….
here is a new codepen
https://codepen.io/iperez_genius/pen/dmMrXP
Once you view it, scroll inside the rendering panel and you will see that the grey background stops.
You could wrap it all in another div
– and change the top position of .loaderBg
if you want the spinner to show center screen at the start.
Without that parent, the element will only be relative to the screen.
Yeah, taking Shikkediel’s example and changed a little: https://codepen.io/anon/pen/XEKxqz
In this example your loader is fixed in the center.
So it depends on how you want it to behave, loader vs content.