diff --git a/css/style.css b/css/style.css index 6d73449..79d582b 100644 --- a/css/style.css +++ b/css/style.css @@ -143,3 +143,10 @@ input[type="checkbox"] { transform: scale(1.2); cursor: pointer; } +.sticky { + position: sticky; + top: 0; + background-color: white; /* lub inny kolor, aby tło było widoczne */ + z-index: 1000; /* zapewnia, że będzie na wierzchu */ + border-bottom: 1px solid #ccc; /* opcjonalnie, aby oddzielić od treści */ +} diff --git a/index.html b/index.html index 4c7913a..96d34dd 100644 --- a/index.html +++ b/index.html @@ -4,9 +4,23 @@ Ocena Zachowania + - +

Ocena Zachowania

diff --git a/js/script.js b/js/script.js index c080565..86f8b55 100644 --- a/js/script.js +++ b/js/script.js @@ -364,3 +364,14 @@ async function generateTable(category) { tbody.appendChild(row); }); } + +//window.onscroll = function() { + // const stickyElements = document.querySelectorAll('.sticky'); + //stickyElements.forEach(element => { + // if (window.pageYOffset > element.offsetTop) { + // element.classList.add('active'); + // } else { + // element.classList.remove('active'); + //} + //}); +//};