2 parents 5b9798f + 76ac125 commit d124b95Copy full SHA for d124b95
2 files changed
24 - Sticky Nav/index-START.html
@@ -54,20 +54,7 @@ <h1>A story about getting lost.</h1>
54
</div>
55
56
<script>
57
- const nav = document.querySelector('#main');
58
- const topOfNav = nav.offsetTop;
59
-
60
- function fixNav() {
61
- if(window.scrollY >= topOfNav) {
62
- document.body.style.paddingTop = nav.offsetHeight + 'px';
63
- document.body.classList.add('fixed-nav');
64
- } else {
65
- document.body.style.paddingTop = 0;
66
- document.body.classList.remove('fixed-nav');
67
- }
68
69
70
- window.addEventListener('scroll', fixNav);
+
71
</script>
72
73
</body>
24 - Sticky Nav/style-START.css
@@ -23,10 +23,6 @@ body {
23
transition: transform 0.5s;
24
}
25
26
-.fixed-nav .site-wrap {
27
- transform: scale(1);
28
-}
29
30
header {
31
text-align: center;
32
height:50vh;
@@ -52,11 +48,6 @@ nav {
52
48
z-index: 1;
53
49
50
-.fixed-nav nav {
- position: fixed;
- box-shadow: 0 5px rgba(0,0,0,0.1)
51
nav ul {
margin: 0;
padding:0;
@@ -81,10 +72,6 @@ li.logo {
81
font-size: 30px;
82
83
74
84
-.fixed-nav li.logo {
85
- max-width:500px;
86
87
88
75
li.logo a {
89
76
color:black;
90
77
0 commit comments