<!DOCTYPE html>
<html>
<head>
<title> tytul | tytul</title>
<link rel="stylesheet" type="text/css" href="style.css"
</head>
<body>
<header>
<a href="#" class="logo">nazwa</a>
<ul>
<li><a href="Strona główna/index.html">Strona główna</a></li>
<li><a href="Regulamin/index.html">Regulamin</a></li>
<li><a href="#">Kontakt</a></li>
</ul>
</header>
<section>
<img src="stars.png" id="stars">
<img src="teamspeak.png" id="teamspeak">
<img src="mountains_behind.png" id="mountains_behind">
<h2 id="text">nazwa</h2>
<a href="#sec" id="btn">O projekcie</a>
<img src="mountains_front.png" id="mountains_front">
</section>
<div class="sec" id="sec">
<h2>O projekcie</h2>
<p> text
<br><br>
text
</p>
</div>
<div class="footer">
<div>!</div>
<script>
// let stars = document.getElementById('stars');
// let teamspeak = document.getElementById('teamspeak');
// let mountains_behind = document.getElementById('mountains_behind');
// let text = document.getElementById('text');
// let btn = document.getElementById('btn');
// let mountains_front = document.getElementById('mountains_front');
// let header = document.querySelector('header');
// window.addEventListener('scroll', function(){
// let value = window.scrollY;
// stars.style.left = value * 0.25 + 'px';
// teamspeak.style.top = value * 1.05 + 'px';
// mountains_behind.style.top = value * 0.5 + 'px';
// mountains_front.style.top = value * 0 + 'px';
// text.style.marginRight = value * 4 + 'px';
// text.style.marginTop = value * 1.5 + 'px';
// header.style.top = value * 0.5 + 'px';
// })
</script>
</body>
</html>
@import url('https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700,800,900&display=swap');
{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Poppins', sans-serif;
scroll-behavior: smooth;
}
body
{
min-height: 100vh;
overflow-x: hidden;
background: linear-gradient(#2b1055,#7597de);
}
header
{
position: absolute;
top: 0;
left: 0;
width: 100%;
padding: 30px 100px;
display: flex;
justify-content: space-between;
align-items: center;
z-index: 10000;
}
header .logo
{
color: #ffff;
font-weight: 700;
text-decoration: none;
font-size: 2em;
text-transform: uppercase;
letter-spacing: 2px;
}
header ul
{
display: flex;
justify-content: center;
align-items: center;
}
header ul li
{
list-style: none;
margin-left: 20px;
}
header ul li a
{
text-decoration: none;
padding: 6px 15px;
color: #ffff;
border-radius: 20px;
}
header ul li a:hover,
header ul li a.active
{
background: #ffff;
color: #2b1055;
}
section
{
position: relative;
width: 100%;
height: 100vh;
padding: 100px;
display: flex;
justify-content: center;
align-items: center;
}
section::before
{
content: '';
position: absolute;
bottom: 0;
width: 100%;
height: 100px;
background: linear-gradient(to top,#1c0522,transparent);
z-index: 1000;
}
section img
{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover;
pointer-events: none;
}
section img#teamspeak
{
mix-blend-mode: screen;
}
section img#mountains_front
{
z-index: 10;
}
#text
{
position: absolute;
color: #fff;
white-space: nowrap;
font-size: 4.5vw;
z-index: 9;
}
#btn
{
text-decoration: none;
display: inline-block;
padding: 8px 30px;
border-radius: 40px;
background: #fff;
color: #2b1055;
font-size: 1.5em;
z-index: 9;
transform: translateY(100px);
}
.sec
{
position: relative;
padding: 100px;
background: #1c0522;
}
.sec h2
{
font-size: 3.5em;
margin-bottom: 10px;
color: #fff;
}
.sec p
{
font-size: 2em;
color: #fff;
}