+ 1

Linear Gradients

Why is my linear gradient not working I looked on w3schools and this is how they did it https://code.sololearn.com/WXGwPhz7z8ww/?ref=app

8th Feb 2022, 12:32 AM
Junior
Junior - avatar
3 Respuestas
+ 3
I wrote 'background: fixed;' a line before 'background-image' and it worked. I guess that's because you didn't allocate background.
8th Feb 2022, 1:33 AM
Sua Cha
+ 1
This is because you are using position: absolute on the body; and he falls out of the general flow. html does not see the body and is folded because it is not sized, (the default html size is set depending on its content). You need to set the html size like this: html { height: 100vh; }
9th Feb 2022, 6:44 AM
Solo
Solo - avatar
0
Thanks Sua Cha
8th Feb 2022, 2:16 AM
Junior
Junior - avatar