HTML, CSS. Прокрутка страницы
Всем привет, при перезагрузке странице она отображается не с самого начала, а на 100-200px ниже,что делать?
body {
margin: 0;
padding: 0;
overflow-x: hidden;
width: 100%;
}
/*First block*/
.first_block {
background-image: url('img/main-image.png');
background-size: cover;
background-repeat: no-repeat;
width: 100%;
height: 1024px;
background-position: center;
}
.first_block::before {
content: '';
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
background-color: rgba(17, 17, 17, 0.7);
opacity: 0.7;
height: 1024px;
}
.header_container {
display: flex;
}
.logo {
z-index: 10;
display: flex;
flex-direction: row;
padding-left: 150px;
padding-top: 40px;
width: 64px;
height: 56px;
cursor: pointer;
}
.logo p {
margin: 0 auto;
padding-left: 10px;
color: #ffffff;
font-size: 34px;
font-family: 'Raleway', sans-serif;
padding-top: 10px;
}
.menu {
display: flex;
flex-direction: row;
list-style: none;
margin: 0 auto;
padding-left: 335px;
}
.menu li {
z-index: 10;
font-family: 'Montserrat', sans-serif;
font-size: 14px;
font-weight: 300;
color: #ffffff;
margin-right: 30px;
padding-top: 60px;
cursor: pointer;
}
.menu li:hover {
color: #c7b299;
transition: .2s
}
.description {
margin-top: 310px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.description_title {
margin: 0 auto;
padding-bottom: 20px;
z-index: 10;
color: #ffffff;
font-family: 'Raleway', sans-serif;
font-size: 36px;
font-weight: 500;
}
.description_portfolio {
padding-bottom: 30px;
margin: 0 auto;
z-index: 10;
color: #ffffff;
font-size: 52px;
font-weight: 800;
font-family: 'Raleway', sans-serif;
}
.description_text {
text-align: center;
z-index: 10;
color: #ffffff;
font-size: 16px;
font-weight: 300;
line-height: 24px;
font-family: 'Montserrat', sans-serif;
width: 562px;
padding-bottom: 50px;
}
.get_started {
padding: 21px 39px;
z-index: 10;
text-transform: uppercase;
text-decoration: none;
background-color: #998675;
color: #ffffff;
border-radius: 5px;
font-family: 'Raleway', sans-serif;
font-weight: 700;
}
.get_started:hover {
background-color: #111111;
transition: .2s;
}
/*Services*/
.services_container {
display: flex;
}
.services_description {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
margin-top: 75px;
margin-bottom: 100px;
}
.services_description img {
width: 44px;
height: 44px;
color: #555555;
}
.services_description:after {
content: '';
display: block;
width: 70px;
height: 3px;
background-color: #f1eee9;
margin-top: 30px;
}
.services_description p:hover {
cursor: pointer;
color: #c7b299;
transition: .2s;
}
.services_description p {
color: #555555;
font-size: 22px;
font-weight: 700;
font-family: 'Raleway', sans-serif;
}
.services_text {
max-width: 80%;
font-size: 14px;
font-weight: 300;
line-height: 24px;
color: #8c8c8c;
font-family: 'Montserrat', sans-serif;
}
/*Ideas*/
.ideas_container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
background-color: #fbfaf8;
}
.ideas_images {
display: flex;
flex-direction: row;
}
.ideas_title {
margin: 0 auto;
font-size: 30px;
font-weight: 700;
color: #555555;
font-family: 'Raleway', sans-serif;
padding-top: 80px;
padding-bottom: 30px;
}
.ideas_text {
font-size: 16px;
font-weight: 300;
line-height: 28px;
color: #8c8c8c;
font-family: 'Montserrat', sans-serif;
padding-bottom: 40px;
width: 70%;
margin: 0 auto;
}
.center {
z-index: 10;
}
.left {
position: relative;
left: 540px;
top: 82px;
height: 400px;
}
.right {
position: relative;
right: 540px;
top: 82px;
height: 400px;
}
.ideas_theme_container {
display: grid;
grid-template-columns: 1fr 1fr;
width: 100%;
background-image: linear-gradient(to right, #211b19 0%, #4e3427 100%);
height: 150px;
align-items: center;
}
.ideas_theme_description {
text-align: left;
padding-left: 100px;
}
.purchase_now {
margin-left: 400px;
background-color: #998675;
border-radius: 3px;
width: 170px;
height: 50px;
text-transform: uppercase;
text-decoration: none;
color: #ffffff;
line-height: 23px;
font-weight: 700;
font-size: 14px;
font-family: 'Raleway', sans-serif;
display: flex;
justify-content: center;
align-items: center;
}
.purchase_now:hover {
background-color: #111111;
transition: .2s;
}
.ideas_theme_text {
font-size: 18px;
font-weight: 300;
color: #615855;
font-family: 'Montserrat', sans-serif;
}
.ideas_theme_title {
font-size: 28px;
font-weight: 400;
color: #ffffff;
font-family: 'Raleway', sans-serif;
margin-top: 0px;
margin-bottom: 10px;
}
.Waxom {
color: #c7b299;
}
/*Projects*/
.projects_container {
margin-top: 70px;
}
.projects_description {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.projects_title {
margin: 0 auto;
padding-bottom: 25px;
color: #555555;
font-size: 30px;
font-weight: 600;
font-family: 'Raleway', sans-serif;
}
.projects_text {
color: #8c8c8c;
font-size: 16px;
line-height: 28px;
font-weight: 300;
font-family: 'Montserrat', sans-serif;
width: 60%;
text-align: center;
margin-bottom: 40px;
}
.projects_button {
border-radius: 3px;
border: 1px solid #ebebeb;
background-color: #ffffff;
height: 32px;
width: 120px;
color: #8c8c8c;
font-weight: 300;
line-height: 21px;
font-size: 14px;
font-family: 'Montserrat', sans-serif;
outline: none;
cursor: pointer;
}
.projects_button:focus {
background-color: #998675;
color: #f2f0ed;
}
.projects_portfolio {
display: grid;
grid-template-rows: repeat(2, 340px);
grid-template-columns: repeat(3, 370px);
align-items: center;
grid-gap: 30px;
margin-top: 40px;
justify-content: center;
}
.project_title {
margin: 0 auto;
color: #c7b299;
font-size: 20px;
font-weight: 500;
font-family: 'Raleway', sans-serif;
padding-left: 30px;
padding-top: 30px;
margin-bottom: 10px;
}
.project_description {
font-size: 14px;
font-weight: 300;
line-height: 20px;
color: #d1d1d1;
font-family: 'Montserrat', sans-serif;
padding-left: 30px;
padding-bottom: 30px;
}
.project_button {
margin-top: 40px;
margin-bottom: 80px;
display: flex;
justify-content: center;
align-items: center;
}
.project_link {
width: 170px;
height: 50px;
background-color: #998675;
color: #ffffff;
border-radius: 3px;
font-size: 14px;
font-weight: 700;
line-height: 23px;
text-transform: uppercase;
font-family: 'Raleway', sans-serif;
text-decoration: none;
display: flex;
align-items: center;
justify-content: center;
}
.project_link:hover {
background-color: #111111;
transition: .2s;
}
.project:hover{
background-color: #362f2d;
transition: background-color .5s;
}
.project .image {
position: relative;
overflow: hidden;
}
.project .image .actions {
position: absolute;
left: 0;
right: 0;
bottom: 0;
top: 0;
visibility: hidden;
transform: translateY(100%);
display: flex;
align-items: center;
justify-content: center;
background-color: rgba(56, 46, 45, 0.7);
transition: visibility .5s, transform .5s;
}
.project .image .actions a {
font-size: 30px;
margin: 0 10px;
padding: 5px;
color: #bcb3a2;
transition: color .2s;
}
.project .image .actions a:hover {
color: #fff;
}
.project .project_description {
padding: 26px 15px;
color: #a79a8a;
border-radius: 10px;
position: relative;
}
.project .project_description p {
padding: 0;
font-weight: 400;
}
.project .project_description .project_text {
font-weight: 300;
transition: color .5s;
}
.project:hover .image .actions {
visibility: visible;
transform: translateY(0);
transition: visibility 0s, transform .5s;
}
.project:hover .project_description .project_text {
color: rgba(255, 255, 255, 0.8);
}
.project_description:after {
content: '';
position: absolute;
left: 20px;
bottom: 106px;
border: 10px solid transparent;
border-bottom: 10px solid #fbfaf8;
}
.project:hover .project_description:after {
visibility: hidden;
}
/*Video*/
.video {
background-image: url('img/bg photo.png');
background-size: cover;
background-repeat: no-repeat;
background-position: center;
height: 800px;
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.video_description {
text-align: center;
}
.video_image {
margin-bottom: 45px;
cursor: pointer;
}
.video_image:hover {
box-shadow: 0 0 10px #fff;
border-radius: 50%;
transition: 0.5s;
}
}
.video_title {
margin: 0 auto;
margin-bottom: 30px;
}
.video_text {
margin: 0 auto;
margin-bottom: 40px;
}
.video_time {
margin: 0 auto;
}
<!DOCTYPE html>
<html>
<head>
<title>Waxom</title>
<link rel="stylesheet" type="text/css" href="Waxom.Landing page.css">
<link href="https://fonts.googleapis.com/css?family=Raleway&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Montserrat&display=swap" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.min.css" rel="stylesheet"/>
</head>
<body>
<!--First block-->
<section class="first_block">
<header class="header">
<div class="section_start">
<div class="header_container">
<div class="logo">
<img src="img/logos.png">
<p class="title">Waxom</p>
</div>
<nav class="navigation">
<ul class="menu">
<li>Home</li>
<li>About us</li>
<li>Portfolio</li>
<li>Features</li>
<li>Blog</li>
<li>Pricing</li>
<li>Shortcodes</li>
<li>Contact</li>
</ul>
</nav>
</div>
</div>
</header>
<div class="description">
<p class="description_title">Unique and Modern Design</p>
<p class="description_portfolio">Portfolio PSD Template</p>
<div class="description_text">
Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum.
</div>
<a href="#" class="get_started">
get started
</a>
</div>
</section>
<!--Services-->
<section class="services">
<div class="services_container">
<div class="services_description">
<img src="img/icon1.png" class="services_image">
<p>Web & App Design</p>
<div class="services_text">Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim.</div>
</div>
<div class="services_description" class="services_image">
<img src="img/icon2.png">
<p>Customization</p>
<div class="services_text">Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim.</div>
</div>
<div class="services_description" class="services_image">
<img src="img/icon.png">
<p>Marketing</p>
<div class="services_text">Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim.</div>
</div>
</div>
</section>
<!--Ideas-->
<section class="ideas">
<div class="ideas_container">
<div class="ideas_description">
<p class="ideas_title">Waxom is Realization of your Ideas.</p>
<div class="ideas_text">Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium.</div>
</div>
<div class="ideas_images">
<img src="img/browser-left.png" class="left">
<img src="img/browser-center.png" class="center">
<img src="img/browser-right.png" class="right">
</div>
<div class="ideas_theme_container">
<div class="ideas_theme_description">
<p class="ideas_theme_title"><span class="Waxom">Waxom </span>Multipurpose WordPress Theme</p>
<div class="ideas_theme_text">Don't Forget to Rate the Template. Thanks so much!</div>
</div>
<a href="#" class="purchase_now">purchase now</a>
</div>
</div>
</section>
<!--Projects-->
<section class="projects">
<div class="projects_container">
<div class="projects_description">
<p class="projects_title">Our Latest Projects.</p>
<div class="projects_text">Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium.
</div>
<div class="projects_categories">
<button class="projects_button" autofocus="">All</button>
<button class="projects_button">Web Design</button>
<button class="projects_button">Mobile App</button>
<button class="projects_button">Illustration</button>
<button class="projects_button">Photography</button>
</div>
</div>
<div class="projects_portfolio">
<div class="project">
<div class="image">
<img src="img/photo1.png" class="project_image">
<div class="actions">
<a href="#!">
<i class="fa fa-link"></i>
</a>
<a href="#!">
<i class="fa fa-search"></i>
</a>
</div>
</div>
<div class="project_description">
<p class="project_title">Claritas Etiam Processus</p>
<div class="project_text">Photography, Nature</div>
</div>
</div>
<div class="project">
<div class="image">
<img src="img/photo.png" class="project_image">
<div class="actions">
<a href="#!">
<i class="fa fa-link"></i>
</a>
<a href="#!">
<i class="fa fa-search"></i>
</a>
</div>
</div>
<div class="project_description">
<p class="project_title">Quam Nutamus Farum</p>
<div class="project_text">Graphic Design, Mock-Up</div>
</div>
</div>
<div class="project">
<div class="image">
<img src="img/photo2.png" class="project_image">
<div class="actions">
<a href="#!">
<i class="fa fa-link"></i>
</a>
<a href="#!">
<i class="fa fa-search"></i>
</a>
</div>
</div>
<div class="project_description">
<p class="project_title">Usus Legentis Videntur</p>
<div class="project_text">Photography, Holiday</div>
</div>
</div>
<div class="project">
<div class="image">
<img src="img/photo3.png" class="project_image">
<div class="actions">
<a href="#!">
<i class="fa fa-link"></i>
</a>
<a href="#!">
<i class="fa fa-search"></i>
</a>
</div>
</div>
<div class="project_description">
<p class="project_title">Claritas Etiam Processus</p>
<div class="project_text">Photography, Nature</div>
</div>
</div>
<div class="project">
<div class="image">
<img src="img/photo4.png" class="project_image">
<div class="actions">
<a href="#!">
<i class="fa fa-link"></i>
</a>
<a href="#!">
<i class="fa fa-search"></i>
</a>
</div>
</div>
<div class="project_description">
<p class="project_title">Quam Nutamus Farum</p>
<div class="project_text">Graphic Design, Mock-Up</div>
</div>
</div>
<div class="project">
<div class="image">
<img src="img/photo5.png" class="project_image">
<div class="actions">
<a href="#!">
<i class="fa fa-link"></i>
</a>
<a href="#!">
<i class="fa fa-search"></i>
</a>
</div>
</div>
<div class="project_description">
<p class="project_title">Usus Legentis Videntur</p>
<div class="project_text">Photography, Holiday</div>
</div>
</div>
</div>
<div class="project_button">
<a href="#" class="project_link">load more</a>
</div>
</div>
</section>
<!--Video-->
<section class="video">
<div class="video_description">
<img src="img/icon-play.png" class="video_image">
<h4 class="video_title">Waxom Video Presentation</h4>
<p class="video_text">Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius, qui sequitur mutationem consuetudium.</p>
<p class="video_time">03:26</p>
</div>
</section>
</body>
</html>