HTML: Image won't display?

后端 未结 7 1829
遥遥无期
遥遥无期 2020-12-11 16:58

I\'m kind of new to HTML. I\'m trying to display an image on my website but for some reason, it just shows a blue box with a question mark in it. I\'ve looked everywhere on

7条回答
  •  星月不相逢
    2020-12-11 17:29

    Lets look at ways to reference the image.

    Back a directory

    ../
    

    Folder in a directory:

     foldername/
    

    File in a directory

     imagename.jpg
    

    Now, lets combine them with the addresses you specified.

     /Resources/views/Default/index.html
     /Resources/public/images/iwojimaflag.jpg
    

    The first common directory referenced from the html file is three back:

     ../../../
    

    It is in within two folders in that:

     ../../../public/images/
    

    And you've reached the image:

     ../../../public/images/iwojimaflag.jpg
    

    Note: This is assuming you are accessing a page at domain.com/Resources/views/Default/index.html as you specified in your comment.

提交回复
热议问题