Background image doesn't show when defined in stylesheet

后端 未结 2 1891
情话喂你
情话喂你 2021-02-20 10:36

I am very new to css so this maybe a simple answer. I have 2 scenarios and 1 works the other doesn\'t. I hope someone can help me out.

WORKS:



        
2条回答
  •  礼貌的吻别
    2021-02-20 11:06

    In my case:

    I had a CSS folder. So, inside my CSS folder I had my style.css so I was typing inside my style.css the following:

    background: url('img/mybgimg.jpg')

    instead of

    background: url('../img/mybgimg.jpg')

    ...I hope this can help to anyone who is having the same issue.

提交回复
热议问题