Merge branch 'teamAPI' into fk1810

This commit is contained in:
Tomasz 2024-10-18 12:24:41 +02:00
commit 7e0dcc5287
3 changed files with 33 additions and 1 deletions

View File

@ -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 */
}

View File

@ -4,9 +4,23 @@
<meta charset="UTF-8">
<title>Ocena Zachowania</title>
<link rel="stylesheet" href="css/style.css">
<style>
table {
width: 100%;
border-collapse: collapse;
}
th {
position: sticky;
top: 0;
background-color: beige; /* Kolor tła nagłówka */
z-index: 10; /* Zapewnia, że nagłówek będzie nad innymi elementami */
border: 1px solid #ddd; /* Opcjonalnie: Dodanie obramowania */
padding: 8px;
}
</style>
</head>
<body>
<h1>Ocena Zachowania</h1>
<div>

View File

@ -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');
//}
//});
//};