Не отображается логотип по центру
Столкнулся с тем, что не отображает логотип по середине страницы, хотя все прописано, все картинки все присутствует
.header {
min-height: 85vh;
width: 100%;
position: relative;
overflow: hidden;
transition: box-shadow 0.3s ease;
}
#backgroundVideo {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover;
filter: brightness(50%); /* Затемнение видео, значение от 0% до 100% */
}
.logo-container {
display: flex;
justify-content: center;
align-items: center;
z-index: 1209;
margin: 0 auto;
}
.logo {
width: 100%;
}
button {
border: 0;
padding: 0;
background: transparent;
cursor: pointer;
}
.navbar,
.navbar-burger,
.menu {
position: fixed;
}
body.open .background {
filter: blur(10px);
}
.navbar {
z-index: 1201;
top: 0;
left: 0;
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
height: 72px;
padding-left: 20px;
padding-right: 72px;
}
.navbar-burger {
z-index: 1203;
top: 0;
left: 0;
display: grid;
place-items: center;
width: 88px;
height: 88px;
background-image: url("./assets/menu.svg");
background-repeat: no-repeat;
background-position: center;
}
body.open .navbar-burger {
background-image: url("./assets/close.svg");
}
.menu {
z-index: 1200;
top: 0;
left: 0;
display: grid;
place-items: center;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.6);
opacity: 0;
visibility: hidden;
border-bottom: 20px solid white;
transition: 0.5s;
}
body.open .menu {
opacity: 1;
visibility: visible;
}
.menu nav:hover a {
opacity: 0.25;
}
.menu nav a:hover {
opacity: 1;
}
.menu nav {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.menu a {
position: relative;
color: #f9f9f9;
font-size: 32px;
padding: 20px 0;
width: 300px;
text-decoration: none;
transition: 0.4s;
}
.menu a::after {
content: "";
position: absolute;
left: 0;
bottom: 10px;
width: 100%;
height: 2px;
border-radius: 2px;
background: #f7f7f7;
transform: scaleX(0);
transform-origin: 0% 50%;
transition: 0.4s;
}
.menu a:hover::after {
transform: scaleX(1);
}
body.open .menu a {
animation: appear 0.3s backwards;
}
@keyframes appear {
0% {
opacity: 0;
translate: 0 50px;
}
100% {
opacity: 1;
}
}
.icon {
display: block;
font-size: 30px;
line-height: 70px;
cursor: pointer;
color: #fff;
}
@media (max-width: 700px) {
.header {
min-height: 70vh;
}
.text-box h1 {
font-size: 14px;
}
}
.text-box {
width: 100%;
color: #f7f7f7;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
text-align: center;
}
.text-box h1{
font-size: 80px;
color: #ffffff;
font-weight: 600;
}
.text-box h1 span {
color: #6f53ed;
position: relative;
}
.text-box h1 span::before {
content: "";
height: 50px;
width: 2px;
position: absolute;
top: 50%;
right: -8px;
background: #6f53ed;
transform: translateY(-45%);
animation: blink 0.7s infinite;
}
.textbox h1 span.stop-blinking::before {
animation: none;
}
@keyframes blink {
50% { opacity: 0 }
}
.text-box p{
margin: 10px 0 40px;
font-size: 15px;
color: #a8a8a8;
}
.hero-btn{
display: inline-block;
text-decoration: none;
color: #fcfcfc;
border: 1px solid #ffffff0e;
border-radius: 5px;
padding: 12px 34px;
font-size: 14px;
background: none;
position: relative;
cursor: pointer;
transition: 0.8s;
overflow: hidden;
}
.hero-btn:hover{
background: #524FD5;
}
.hero-btn::before{
content: "";
position: absolute;
left: 0;
width: 100%;
height: 0%;
background: #524FD5;
z-index: -1;
transition: 0.7s;
bottom: 0;
border-radius: 50% 50% 0 0;
}
.hero-btn:hover::before{
height: 180%;
}
<section class="header">
<video autoplay muted loop id="backgroundVideo">
<source src="images/backgroundvideo.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
<div class="logo-container">
<a href="index.html">
<img src="images/logocolor.png" alt="Logo" class="logo">
</a>
</div>
<button class="navbar-burger" onclick="toggleMenu()"></button>
<div class="menu">
<nav>
<a href="#" style="animation-delay: 0.1s">About</a>
<a href="#" style="animation-delay: 0.2s">Portfolio</a>
<a href="#" style="animation-delay: 0.3s">Services</a>
<a href="#" style="animation-delay: 0.5s">Contact</a>
</nav>
</div>
<script type="text/javascript">
const toggleMenu = () => {
document.body.classList.toggle("open");
};
</script>
<div class="text-box">
<h1>HARMONY OF <span></span></h1>
<p>Уникальная программа обучения для вашего ребенка.<br>Получите качественное международное образование уже сейчас.</p>
<a href="" class="hero-btn">ПОЛУЧИТЬ КОНСУЛЬТАЦИЮ</a>
</div>
</section>
Ответы (1 шт):
Автор решения: budaPest
→ Ссылка
.logo-container {
width: 100%;
height: 100vh;//<==
display: flex;
justify-content: center;
align-items: center;
z-index: 1209;
margin: 0 auto;
}