Oto przykładowy kod HTML/JS/CSS w jednym pliku, który tworzy taki plakat:
<!DOCTYPE html>
<html>
<head>
<style>
body {
margin: 0;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background: #222;
font-family: 'Arial Black', sans-serif;
}
.poster {
position: relative;
width: 800px;
height: 1200px;
background: linear-gradient(rgba(0,0,0,0.9), rgba(20,30,40,0.9)),
url('https://images.unsplash.com/photo-1584438784894-089d73352e82?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
background-size: cover;
border: 4px solid #d4af37;
box-shadow: 0 0 20px #d4af37;
}
.general {
position: absolute;
width: 500px;
bottom: 100px;
left: 50px;
filter: contrast(1.1) drop-shadow(5px 5px 10px rgba(0,0,0,0.8));
}
.finger {
position: absolute;
width: 120px;
height: 40px;
background: #d4af37;
right: 100px;
top: 400px;
transform: rotate(-15deg);
border-radius: 60% 40% 40% 60%;
box-shadow: 0 0 10px #d4af37;
}
.text {
position: absolute;
color: #fff;
text-align: center;
width: 100%;
top: 200px;
text-shadow: 3px 3px 5px #000;
}
.main-text {
font-size: 48px;
letter-spacing: 2px;
}
.highlight {
font-size: 120px;
color: #d4af37;
display: block;
margin: 20px 0;
letter-spacing: 8px;
text-transform: uppercase;
}
.sub-text {
font-size: 36px;
color: #ccc;
}
</style>
</head>
<body>
<div class="poster">
<img src="https://images.unsplash.com/photo-1584438784894-089d73352e82?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=80"
class="general" alt="General">
<div class="finger"></div>
<div class="text">
<div class="sub-text">Ja już zbiłem bossa na LME</div>
<div class="highlight">TWOJA</div>
<div class="main-text">kolej</div>
</div>
</div>
</body>
</html>
Ten kod tworzy:
- Ciemne tło z militarnego obrazu
- Złoty akcent kolorystyczny
- Dynamicznie wyglądający palec wskazujący
- Wyraźnie wyróżnione "TWOJA" w kolorze złotym
- Cieniowanie i efekty 3D
- Responsywny design
Aby użyć własnego obrazu generała, wystarczy zmienić URL w atrybucie src obrazu z klasą "general". Obecny placeholder to przykładowy obraz z Unsplash.