У меня есть миссия сделать этот сайт (для ПК и для мобильных устройств - адаптивный сайт): https://i.imagesup.co/images2/6af7575749ceb0e4fb14a12d91506e718a24e6a6.png https://i.imagesup.co/images2/a1ae5b9bb2ec6d036e3f3e2c3396e4f909923a47.png
Я вроде сделал это, но на самом деле этот сайт имеет многопроблемы, и я хотел бы получить некоторую вашу помощь:
Я могу прокрутить вниз и пролистать влево слишком много. Как я могу это исправить?
Вы видите, что есть большое поле "type = text" и заполнитель начинается с середины. Так не должно быть, как это можно исправить? Я хочу, чтобы он был в верхнем правом углу, как и другие?
Самая большая проблема: я сделал "отзывчивым", но на самом деле это очень плохо. Единственная часть, которая действительно отзывчива: https://i.imagesup.co/images2/8d3675c948ea95d3ad66ae3a0fa6e2b945eb7adc.png Независимо от того, как я изменяю размер окна, оно всегда отзывчиво, например: https://i.imagesup.co/images2/b990ad387a3bfc05312cd4e3edbd5f353d8fa90b.png
Остальные ужасны: * https://i.imagesup.co/images2/cdf13e4d1939b4041c55ab3b59799762e3d8f32d.png Почему все остальные белые поля и то, что они включают (на самом деле не включают в код), уходят. Это до того, как размер окна соответствует медиазапросу. * А вот как выглядят эти белые ящики и что они включают в мобильную версию: https://i.imagesup.co/images2/9944b71f663d11399e256007f823433e5843d586.png Кажется правильным? Но посмотрите, как оно выглядит, когда оно делает окно еще меньше, а не портит: https://i.imagesup.co/images2/007f47c1df59bdf745a531d55c9c8965270508aa.png Почему это происходит, как я могу предотвратить это?
Эту проблему необходимо решить безжадность * Я почти уверен, что это происходит из-за позиции, особенно когда я устанавливаю их в начале справа и слева.
Почему белые прямоугольники появляются в самом начале страницы, когда я устанавливаю «right: 0px».
Большое спасибо за помощь.
index.html:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>HomePage</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="hover.css">
<link rel="stylesheet" href="WhiteBox.css">
<link rel="stylesheet" href="mobile.css">
<link href="https://fonts.googleapis.com/css?family=M+PLUS+Rounded+1c&display=swap" rel="stylesheet">
</head>
<body>
<header>
<img class="img-center" id="img-main" src="https://www.westsidemovement.com/wp-content/uploads/2018/03/Lets-Go-Scripture-800x200.jpg" alt="E=MC^2"/>
<img class="img-center" id="img-below" src="https://thumbor.forbes.com/thumbor/960x0/https%3A%2F%2Fblogs-images.forbes.com%2Frainerzitelmann%2Ffiles%2F2019%2F06%2FE0MG76-e1560965378507-1200x1270.jpg" alt="Albert"/>
<h1>אלברט איינשטיין</h1>
<h2>פיזיקאי תיאורטי</h2>
<div id="DivIcons">
<div id="flex-mobile1">
<a href="tel:+4917640206387" target="_blank"><img id="MobileHover" class="icons" src="https://cdn2.iconfinder.com/data/icons/thin-line-color-1/21/13-512.png" alt="Moblie Icon"></a>
<a href="https://www.whatsapp.com/" target="_blank"><img class="icons" src="https://img.icons8.com/ultraviolet/452/whatsapp.png" alt="What'sapp Icon"></a>
<a href="https://www.instagram.com/" target="_blank"><img class="icons" src="https://www.trzcacak.rs/myfile/full/311-3111799_social-media-computer-icons-logo-blue-area-png.png" alt="Instagram Icon"></a>
</div>
<div id="flex-mobile2">
<a href="https://mail.google.com/mail/u/0/#inbox" target="_blank"><img class="icons" src="https://cdn2.iconfinder.com/data/icons/basic-thin-line-color/21/20-512.png" alt="Email Icon"></a>
<a href="https://he-il.facebook.com/" target="_blank"><img class="icons" src="https://thebrightwork.com/wp-content/uploads/2014/04/facebook-icon-blue.png" alt="Facebook Icon"></a>
<a href="https://www.waze.com/he/livemap" target="_blank"><img class="icons" src="https://cdn4.iconfinder.com/data/icons/social-media-logos-6/512/10-waze-512.png" alt="Waze Icon"></a>
</div>
</div>
<div id="FirstWhite"></div> <!--Only for Design - White Box-->
</header>
<main>
<article>
<h3>
קצת עלי
</h3>
<b>
<p>
לורם איפסום דולור סיט אמט, קונסקטורר אדיפיסינג אלית. סת אלמנקום ניסי נון ניבאה. דס איאקוליס וולופטה דיאם. וסטיבולום אט דולור, קראס אגת לקטוס וואל אאוגו וסטיבולום סוליסי טידום בעליק.
</p>
</b>
<p>
לורם איפסום דולור סיט אמט, קונסקטורר אדיפיסינג אלית. סת אלמנקום ניסי נון ניבאה. דס איאקוליס וולופטה דיאם. וסטיבולום אט דולור, קראס אגת לקטוס וואל אאוגו וסטיבולום סוליסי טידום בעליק.
</p>
<p>
לורם איפסום דולור סיט אמט, קונסקטורר אדיפיסינג אלית. סת אלמנקום ניסי נון ניבאה. דס איאקוליס וולופטה דיאם. וסטיבולום אט דולור, קראס אגת לקטוס וואל אאוגו וסטיבולום סוליסי טידום בעליק.
</p>
</article>
<div id="AboutWhite"></div> <!--Only for Design - White Box-->
<section> <!--Servicies -->
<div id="service">
<h3 id="position3">השירותים שאני נותן</h3>
<div class="square"><p class="Pservice">שירות א</p></div>
<div class="circle"><p class="Pservice">שירות ב</p></div>
<div class="square"><p class="Pservice">שירות ג</p></div>
<div class="circle"><p class="Pservice">שירות ד</p></div>
<div class="square"><p class="Pservice">שירות ה</p></div>
</div>
</section>
<div id="ServiceWhite"></div> <!--Only for Design - White Box-->
</main>
<footer id="form">
<h3>צרו קשר</h3>
<form id="inside-form">
<input type="text" placeholder="השם שלך" name="FullName" required>
<input type="tel" placeholder="מספר הטלפון שלך" name="PhoneNum" required>
<br/> <br/> <br/>
<input type="text" placeholder="ההודעה שלך" name="Messege" id="textarea">
<br/> <br/>
<input type="submit" id="submit" value="שלח">
</form>
</footer>
<div id="FooterWhite"></div> <!--Only for Design - White Box-->
</body>
</html>
style.css
body {
margin: auto 0;
direction: rtl;
background-color:#F0F0F0;
}
.img-center {
display: block;
margin: 0 auto;
}
#img-below {
border: 5px solid white;
border-radius: 100%;
height: 8%;
width: 8%;
position: relative;
bottom: 80px;
}
h1 {
color:#0099ff;
text-align: center;
position: relative;
bottom: 120px;
font-size: 50px;
font-family: 'M PLUS Rounded 1c', sans-serif;
}
h2 {
color: gray;
font-size: 30px;
text-align: center;
font-size: 30px;
position: relative;
bottom: 157px;
font-family: 'M PLUS Rounded 1c', sans-serif;
}
.icons {
height: 50px;
width: 50px;
border: #0099ff 5px solid;
padding: 5px;
border-radius: 100%;;
margin-right: 15px;
}
#DivIcons {
display: flex;
flex-direction: row;
justify-content: center;
position: relative;
bottom: 170px;
}
p {
font-family: 'M PLUS Rounded 1c', sans-serif;
font-size: 15px;
}
article {
width: 160px;
margin-bottom: 5px;
position: relative;
bottom: 455px;
right: 397px;
}
h3 {
font-family: 'M PLUS Rounded 1c', sans-serif;
}
.square {
border:5px solid #0099ff;
height: 80px;
width: 80px;
margin-left: 20px;
border-radius: 30%;
}
.circle {
border:5px solid #0099ff;
border-radius: 100%;
height: 80px;
width: 80px;
margin-left: 20px;
}
.Pservice {
color: #0099ff;
text-align: center;
position: relative;
top: 12px;
}
#service {
display: flex;
flex-direction: row;
position: relative;
bottom: 1710px;
right: 440px;
}
#position3 {
position: relative;
bottom: 70px;
right: 157px;
}
#form {
position: relative;
bottom: 1830px;
right: 593px;
}
input {
border-radius: 6px;
}
input:nth-child(1)
{
width: 250px;
height: 20px;
margin-left: 10px;
}
input:nth-child(2)
{
width: 250px;
height: 20px;
}
#textarea {
width: 520px;
height: 250px;
margin-bottom: 10px;
}
#submit {
background-color: #0099ff;
color: white;
height: 50px;
width: 120px;
position: relative;
right: 200px;
bottom: 10px;
cursor: pointer;
}
WhiteBox.css
#FirstWhite{
width: 750px;
height: 320px;
background-color: white;
margin: 0 auto;
position: relative;
bottom: 460px;
z-index: -1;
margin-bottom: 5px;
}
#AboutWhite {
width: 180px;
height: 650px;
background-color: white;
position: relative;
bottom: 1113px;
right: 385px;
z-index: -1;
}
#ServiceWhite {
width: 555px;
height: 165px;
background-color: white;
z-index: -1;
position: relative;
bottom: 1855px;
right: 580px;
}
#FooterWhite {
width: 555px;
height: 463px;
background-color: white;
z-index: -1;
position: relative;
bottom: 2292px;
right: 580px;
}
mobile.css:
@media screen and (max-width:768px)
{
#img-main {
width: 100vw;
height: 150px;
}
#img-below {
width: 30vw;
height: 30vh;
margin-bottom: 10px;
}
h1, h2 {
font-size: 7vw;
position: relative;
bottom: 100px;
margin: 0 auto;
font-family: 'M PLUS Rounded 1c', sans-serif;
}
#flex-mobile1 {
display: flex;
flex-direction: row;
position: relative;
top: 70px;
right: 120px;
margin-top: 10px;
}
#flex-mobile2 {
display: flex;
flex-direction: row;
position: relative;
top: 150px;
left: 133px;
margin-top: 10px;
}
#FirstWhite{
width: 100vw;
height: 500px;
background-color: white;
display: block;
margin: 0 auto;
position: relative;
bottom: 490px;
z-index: -1;
margin-bottom: 5px;
}
#AboutWhite {
width: 100vw;
height: 300px;
background-color: white;
position: relative;
right: 0px;
bottom: 588px;
}
article {
position: relative;
right: 0px;
width: 85vw;
margin-right: 10px;
height: 100px;
}
#ServiceWhite
{
position: relative;
bottom: 650px;
right: 0px;
width: 100vw;
}
#service
{
position: relative;
bottom: 500px;
right: -120px;
}
#FooterWhite
{
position: relative;
bottom: 1080px;
right: 0px;
width: 100vw;
}
#form {
position: relative;
right: 0px;
bottom: 620px;
margin-right: 15px;
}
#inside-form {
position: relative;
right: 40px;
}
}
** также есть файл hover css, но он не актуален (наведите курсор на значки в начале страницы).