sharp97
@sharp97
не фонтан но брызги есть

Как исправить появление белого квадрата при вертикальном скроле?

Когда скролю на мобилке там появляется такой вот белый квадратик
Пробовал уже задавать min-height,height,-webkit-overflow-scrolling: auto; не робит
до этого сталкивался с подобным фиксил - background-position: top center; vertical-align: middle; сейчас такое решение не подходит
думаю мб попробовать сделать fixed фон, overflow: scroll , не знаю насколько это адекватно.

OZyYEAf6Bz4.jpg?size=509x1079&quality=96&sign=0f8acf0d9a04200af2607df7df5fab9c&type=album

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>тестовое задание с котами</title>
	<link rel="stylesheet" type="text/css" href="css/style.css" />
	<link rel="stylesheet" type="text/css" href="css/normalize.css" />
</head>
<body>
	<div class="container">
		<p class="general_title">Ты сегодня покормил кота?</p>
		<div class="flex_container_cats">
			<div class="content_column">
				<div class="content_cat_background">
					<div class="content_cat_inside">
						<h1 class="content_cat_inside_h1">Сказочное заморское яство</h1>
						<h1 class="hidden">ᅠ ᅠᅠ ᅠᅠ ᅠᅠ ᅠ</h1>
						<h2 class="swap_h2"><span><b>Нямушка</b></span><br><b>с фуа-гра</b></h2>
						<h3 class="swap_h3"><b>10</b> порций<br>мышь в подарок</h3>
						<div class="content_cat_row">
							<img src="images/cat.png" class="img_cat">
							<div class="circle"><span>0,5</span><br>кг</div>
						</div>
					</div>
				</div>
				<p class="text">Чего сидишь? Порадуй котэ, <a href="#"><b><span id ="line_a">купи.</span></b></a></p>
				<p class="text_hidden"> ᅠᅠ ᅠᅠ ᅠᅠ</p>
			</div>
				<div class="content_column">
				<div class="content_cat_background">
					<div class="content_cat_inside">
						<h1 class="content_cat_inside_h1">Сказочное заморское яство</h1>
						<h1 class="hidden">ᅠ ᅠᅠ ᅠᅠ ᅠᅠ ᅠ</h1>
						<h2 class="swap_h2"><span><b>Нямушка</b></span><br><b>с фуа-гра</b></h2>
						<h3 class="swap_h3"><b>10</b> порций<br>мышь в подарок</h3>
						<div class="content_cat_row">
							<img src="images/cat.png" class="img_cat">
							<div class="circle"><span>0,5</span><br>кг</div>
						</div>
					</div>
				</div>
				<p class="text">Чего сидишь? Порадуй котэ, <a href="#"><b><span id ="line_a">купи.</span></b></a></p>
				<p class="text_hidden"> ᅠᅠ ᅠᅠ ᅠᅠ</p>
			</div>
				<div class="content_column">
				<div class="content_cat_background">
					<div class="content_cat_inside">
						<h1 class="content_cat_inside_h1">Сказочное заморское яство</h1>
						<h1 class="hidden">ᅠ ᅠᅠ ᅠᅠ ᅠᅠ ᅠ</h1>
						<h2 class="swap_h2"><span><b>Нямушка</b></span><br><b>с фуа-гра</b></h2>
						<h3 class="swap_h3"><b>10</b> порций<br>мышь в подарок</h3>
						<div class="content_cat_row">
							<img src="images/cat.png" class="img_cat">
							<div class="circle"><span>0,5</span><br>кг</div>
						</div>
					</div>
				</div>
				<p class="text">Чего сидишь? Порадуй котэ, <a href="#"><b><span id ="line_a">купи.</span></b></a></p>
				<p class="text_hidden"> ᅠᅠ ᅠᅠ ᅠᅠ</p>
			</div>
		</div>
	</div>
</body>
</html>

@import "https://allfont.ru/allfont.css?fonts=exo-20-thin";
@font-face
{
  font-family: loles;
  src: url("exo-20-thin.ttf");
}
@font-face
{
  font-family: treb;
  src: url("Trebuchet MS.ttf");
}
html {
    height  : 100%;
    overflow: hidden;
    position: relative;
}
body {
  background: url(../images/prototype_background.jpg) no-repeat center center fixed;
  background-repeat: no-repeat;
  -khtml-background-size: cover;
  -moz-background-size: cover;
  -ms-background-size: cover;
  -o-background-size: cover;
  -webkit-background-size: cover;
  background-size: cover;
   height: 100%;
}
.container {
  max-width: 1120px;
  padding-left: 40px;
  padding-right:40px;
  display: flex;
  flex-direction: column;
  margin:0 auto;
  justify-content: flex-end;
}
.flex_container_cats{
  display: flex;
  flex-direction: row;
  width: 100%;
  height: 100%;
  margin-top: 50px;
  justify-content: space-between;
}
.content_cat_background{
  width: 320px;
  display: flex;
  flex-direction: column;
  padding: 4px;
  background:linear-gradient(135deg, transparent 30px, rgb( 22, 152, 217 ) 0);
  border-radius: 5px;
   transition-duration: 0.5s;
   overflow: hidden;
}

.content_column{
  display: flex;
  gap: 2rem;
  flex-direction: column;
}
.text{
color: #ffffff;
font-size: 13px;
margin:-15px auto;
font-family: "treb";
display: block;
}
.text_hidden{
color: #ffffff;
font-size: 13px;
margin:-18px auto;
font-family: "treb";
display: none;
}
@keyframes ani {
  0% {opacity: 0;}
  100% {opacity: 1;}
}
#line_a{
  color: #1698d9;
  animation: ani 2.5s forwards;
  border-bottom: 1px dashed #1698d9; 
  border-collapse: collapse;
}
.content_column a{
  text-decoration: none;
}
.content_cat_inside{
  margin: auto;
  width: 320px;
  height: 480px;
  overflow: hidden;
  background:linear-gradient(135deg, transparent 30px, #f2f2f2 0);
  border-radius: 5px;
  cursor: pointer;
}
.content_cat_inside_h1{
  font-size: 16px;
  font-family: "treb";
  color: #666666;
  margin: 20px auto;
 width: 250px;
  text-align: left;
    margin-left: 50px;
  font-weight: 400;
  transition-duration: 1s;
  display: block;
}
.hidden{
   font-size: 16px;
  font-family: "treb";
  color: #666666;
  margin: 18.40px auto;
 width: 250px;
  text-align: left;
    margin-left: 50px;
  font-weight: 400;
  transition-duration: 1s;
  display: none;
}
.content_cat_inside h2{
  position: relative;
  font-size: 24px;
  font-family: "treb";
  margin-top: -10px;
  margin-left: 15%;
  text-align: left;
  color: #000000;
  font-weight: 500;
}

.hidden span{
  font-size: 48px;
  font-family: "treb";
  text-align: left;
  color: #000000;
  font-weight: 500;
}
.content_cat_inside h3{
  font-size: 14px;
  font-family: "treb";
  width: 200px;
  text-align: left;
    margin-left: 50px;
  color: #666666;
  font-weight: 400;
  margin-top: -10px;
}
.content_cat_inside span{
  font-size: 48px;
  font-family: "treb";
  text-align: left;
  color: #000000;
  font-weight: 500;
}
.content_cat_row{
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
 margin-top: -5px;
}
.circle{
  font-size: 21px;
  background-color: rgb( 22, 152, 217 );
  border-radius: 50%;
  width: 74px;
  height: 65px;
  text-align: center;
  padding-top: 20px;
  padding-right: 5px;
  padding-left: 5px;
  color: #ffffff;
  margin-top: 202px;
  margin-left:-135px;
  line-height: 25px;
  font-family: "treb";
  transition-duration: 0.5s;
  z-index: 5;
}
.circle span{
  font-size: 42px;
    font-family: "treb";
   color: #ffffff;
}
.img_cat{
  margin-left:-55px;
  margin-top: -50px;
  z-index: 2;
}

.general_title{
  margin:auto;
  margin-top: 48px;
  font-family:loles;
  font-size: 36px;
  color: #ffffff;
}
@media (min-width:510px) and (max-width: 1155px){
  .flex_container_cats{
    overflow: scroll;
    margin:0spx auto;
    align-items: center;
    gap: 40px;
  }
  /*.flex_container_cats::-webkit-scrollbar {
    width: 0 !important;
}*/
  .content_column{
    margin-top: 50px;
  }
  .flex_container_cats{
    margin-top: 31px;
  }
   .content_column p{
    margin-top: -10px;
  }
#line_a{
  color: #1698d9;
  animation: ani 2.5s forwards;
  border-bottom: 0;
}
   .general_title{
    font-size: 30px;
  }
  }
  @media (min-width:280px) and (max-width: 509px){
  .flex_container_cats{
    flex-direction: column;
    margin:0 auto;
    align-items: center;
  }
  
  .general_title{
    font-size: 25px;
  }
  .content_column{
    margin-top: 50px;
  }
  #line_a{
  border-bottom: 0;
}
   .content_column p{
    margin-top: 5px;
  }
  .text *:last-child *:last-child{
    padding-bottom: 40px;
  }
  }
  @media (min-width:280px) and (max-width: 394px){
  .general_title{
    font-size: 24px;
  }
  }
  • Вопрос задан
  • 143 просмотра
Решения вопроса 1
sharp97
@sharp97 Автор вопроса
не фонтан но брызги есть
редачу ответ мало ли кому пригодиться - посмотрите на мой код выше и на вот этот - это и есть решение проблемы белого квадратика с низу при скроле на мобилке, like кому помогло )
body {
  background: url(../images/prototype_background.jpg);
  height: 100vh;
  min-height: 100vh !important;
}
Ответ написан
Комментировать
Пригласить эксперта
Ответы на вопрос 1
@YarikLtv4k
htmlbook.ru/css/background-repeat

Скорее всего нужно убрать no-repeat / заменить из списка из статьи.
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы