+ 25
Please help
Why nav background-color not change on scroll đ€đ https://code.sololearn.com/WO5qgwQoY8Sg/?ref=app
12 Respostas
+ 15
https://code.sololearn.com/W4gM2hOVOmD9/
+ 2
Height takes vh value not vw
Like
height : 100vh;
+ 1
Can someone explain why we have vw on a height attribute like this:
>> .container_1{
width:100%;
height:140vw;
I failed to understand.
+ 1
body{
background-color:black;
height:100vh;
}
.container_1{
width:100%;
height:150vw;
You've to edit this field of you code and It will be good đ
+ 1
Just like they said
Viewport height
height : 100vh;
In the css snippet
+ 1
This is your solution i think :
https://code.sololearn.com/WeZnNNsfffo2/?ref=app
+ 1
You declare height in vw which is wrong and not declare the height of the nav and nav . Sticky must be .sticky only and in the sticky class background property must bhi background-color:
0
Check this code output
0
You are changing "nav" class name. You have to change the body class name .And use add and remove instead of toggle.
0
css selector is wrong, it must be nav.sticky
and you changed position of the images to absolute so nav height become 0 therefore you are not able to see the change