Сайт дергается вниз после загрузки и при проигрывании первой анимации
Проблема в том, что при загрузке сайта проигрывается несколько аннимаций одновременно и какая-то из них сдвигает сайт вниз пока не проигается . Смотрите сайт через ф12 поскольку сайт не адаптивный. Только в разрешении 1920х1080. Заранее спасибо !!!
html {
box-sizing: border-box;
}
*,
*::before,
*::after {
box-sizing: inherit;
}
body {
font-family: 'Inter';
font-style: normal;
font-size: 16px;
font-weight: normal;
color: #FAFAF9;
position: relative;
}
.custom-btn {
padding: 24px 74px;
color: #fff;
border-radius: 10px;
padding: 10px 25px;
background: transparent;
cursor: pointer;
transition: all 0.3s ease;
position: relative;
display: inline-block;
box-shadow: inset 2px 2px 2px 0px rgba(255, 255, 255, .5), 7px 7px 20px 0px rgba(0, 0, 0, .1), 4px 4px 5px 0px rgba(0, 0, 0, .1);
outline: none;
}
/*Header styles start*/
.header {
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 2;
background: #0C0B0B;
}
.header_wrapper {
display: flex;
flex-wrap: wrap;
align-items: flex-end;
padding-top: 54px;
padding-left: 6px;
}
.wrapper {
max-width: 1520px;
margin: 0 auto;
}
.header_list {
margin-left: 330px;
left: 0;
display: flex;
flex-wrap: wrap;
padding-bottom: 16px;
}
.header_item {
margin-right: 46px;
}
.header_item:last-child {
margin-right: 0px;
}
.header_link {
font-size: 26px;
line-height: 31px;
color: #FAFAF9;
text-decoration: none;
}
.header_link:hover,
.header_link:focus,
.header_link:active {
opacity: .75;
text-decoration: underline;
}
/*Header styles end*/
/*Intro styles start*/
.intro {
/*min-height: 100vh;*/
min-height: 944px;
background: #0C0B0B;
padding-top: 250px;
}
.intro_main {
padding-left: 50px;
}
.intro_title {
display: block;
position: relative;
letter-spacing: -2px;
color: black;
-webkit-text-stroke-width: 2px;
-webkit-text-stroke-color: #FFFFFF;
font-weight: 900;
font-size: 150px;
font-family: 'Roboto';
min-height: 132px;
}
.intro_title_bottom {
display: block;
font-family: 'Roboto';
font-weight: 900;
max-width: 1028px;
font-size: 146px;
line-height: 154px;
letter-spacing: 2px;
color: #FAFAF9;
border: 1px solid #000000;
}
.intro_sub_title {
display: block;
margin-top: 66px;
min-width: 587px;
font-weight: 400;
font-size: 20px;
line-height: 24px;
letter-spacing: 0.5px;
color: rgba(239, 237, 232, 0.65);
}
.intro_title span {
opacity: 0;
animation-delay: 1.4s;
display: block;
animation: textAnimate 1.5s cubic-bezier(1, 1, 0, 0) forwards;
}
@keyframes textAnimate {
0% {
transform: translateY(-100px);
opacity: 0;
}
50% {
transform: translateY(-50px);
opacity: 0.5;
}
100% {
transform: translateY(0);
opacity: 1;
}
}
.intro_title_bottom span {
opacity: 0;
animation-delay: 0.7s;
display: block;
animation: textAnimate_bot 1.5s cubic-bezier(1, 1, 0, 0) forwards;
}
@keyframes textAnimate_bot {
0% {
transform: translateY(-200px);
opacity: 0;
}
50% {
transform: translateY(-100px);
opacity: 0.5;
}
100% {
transform: translateY(0);
opacity: 1;
}
}
.btn-5 {
margin-top: 54px;
padding: 24px 74px;
font-size: 26px;
line-height: 42px;
border: none;
background: #E6533C;
;
background: linear-gradient(0deg, rgba(255, 27, 0, 1) 0%, rgba(251, 75, 2, 1) 100%);
}
.btn-5:hover {
color: #f0094a;
background: transparent;
box-shadow: none;
}
.btn-5:before,
.btn-5:after {
content: '';
position: absolute;
top: 0;
right: 0;
height: 2px;
width: 0;
background: #f0094a;
box-shadow: -1px -1px 5px 0px #fff, 7px 7px 20px 0px #0003, 4px 4px 5px 0px #0002;
transition: 400ms ease all;
}
.btn-5:after {
right: inherit;
top: inherit;
left: 0;
bottom: 0;
}
.btn-5:hover:before,
.btn-5:hover:after {
width: 100%;
transition: 800ms ease all;
}
.foto_trener {
position: absolute;
margin-left: 904px;
top: 0;
right: 0;
z-index: 1;
margin-top: 167px;
}
.foto_trener img {
opacity: 0;
animation-delay: 0.7s;
animation: foto_trenerAnimation 1.5s cubic-bezier(0, 0, 1, 1) forwards;
}
@keyframes foto_trenerAnimation {
0% {
transform: translateX(-200px);
opacity: 0;
}
50% {
transform: translateX(-100px);
opacity: 0.5;
}
100% {
transform: translateX(0);
opacity: 1;
}
}
/*Intro styles end*/
HTML
=========
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Personalny Trener</title>
<link rel="stylesheet" type="text/css" href="./css/reset.css">
<link rel="stylesheet" type="text/css" href="./css/style.css">
</head>
<body>
<!--Header starts-->
<header class="header">
<div class="wrapper">
<div class="header_wrapper">
<div class="header_logo">
<a href="/" class="header_logo-link">
<img src="./img/svg/AM-logo.svg" alt="Personalny Trener" class="header_logo-pic">
</a>
</div>
<nav class="header_nav">
<ul class="header_list">
<li class="header_item">
<a href="#!" class="header_link">PROGRAMS</a>
</li>
<li class="header_item">
<a href="#!" class="header_link">HEALTHY LIVING</a>
</li>
<li class="header_item">
<a href="#!" class="header_link">COMMUNITY</a>
</li>
<li class="header_item">
<a href="#!" class="header_link">ABOUT</a>
</li>
<li class="header_item">
<a href="#!" class="header_link">STORE</a>
</li>
</ul>
</nav>
</div>
</div>
</header>
<!--Header end-->
<main class="main">
<!--Intro start-->
<section class="intro">
<div class="wrapper">
<div class="intro_main">
<div class="foto_trener">
<img src="./img/trener.png">
</div>
<h1 class="intro_title">
<span>PERSONALNY<br></span>
</h1>
<h2 class="intro_title_bottom">
<span>TRENER</span>
</h2>
<div class="intro_sub_title">
<p>
Programs offer day-to-day Lorem Ipsum is simply<br> dummy text of the printing and typesetting industry.
</p>
</div>
<button class="custom-btn btn-5">
<p>PROGRAMS</p>
</button>
</div>
</div>
</section>
<!--Intro end-->
</main>
</html>