How to go up a level in the src path of a URL in HTML?

后端 未结 6 1284
北荒
北荒 2020-11-28 02:06

I am storing style sheets in {root}/styles while images in {root}/images for a website. How do I give the path in the style sheets to go look in the images directory for th

6条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-28 02:36

    Use .. to indicate the parent directory:

    background-image: url('../images/bg.png');
    

提交回复
热议问题