Я пытаюсь установить изображение в качестве фона, но он не подходит на мобильные телефоны:фоновое изображение не отображается на весь экран на мобильный
Есть еще способ сделать это без изменения обоев с атрибутом @media?
Мой HTML и CSS:
body {
/* Location of the image */
background-image: url(../img/background.jpg);
/* Background image is centered vertically and horizontally at all times */
background-position: center center;
/* Background image doesn't tile */
background-repeat: no-repeat;
/* Background image is fixed in the viewport so that it doesn't move when
the content's height is greater than the image's height */
background-attachment: fixed;
/* This is what makes the background image rescale based
on the container's size */
background-size: cover;
/* Set a background color that will be displayed
while the background image is loading */
background-color: #464646;
}
<!DOCTYPE html>
<html>
<head>
\t <link rel="stylesheet" type="text/css" href="css/style.css">
<title>Title of the document</title>
</head>
<body>
<h1>ALOOOU</h1>
</body>
</html>
use body {height: 100vh;} –
это работает, но теперь я получаю полосу прокрутки на рабочем столе: | – Flash