Фоновое изображение не отображается в CSS, хотя оно видно при проверкеCSS

Разбираемся в CSS
Ответить
Гость
 Фоновое изображение не отображается в CSS, хотя оно видно при проверке

Сообщение Гость »


У меня есть такое фоновое изображение:

Код: Выделить всё

body {
font-family: Nunito;
background-position: center;
background: url("/src/assets/graphic.png");
}
I can see in the inspect tab the background image is being applied and I can see the image itself when I hover over the path. However, on the page, nothing is being displayed. If I apply it to an img tag it works fine. I've tried changing background to background-image and applying widths and such with nothing working. I even compressed the image to see if that would work, but nope.
Изображение
However, when I change the image to a random one I found on google images it works:
Изображение
Any help? I'm entirely stuck on such a simple issue. The fact that the supposedly broken image works in an tag but not in the background-image property is driving me mad.


Источник: https://stackoverflow.com/questions/781 ... in-inspect
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «CSS»