Defining root of HTML in a folder within the site root folder

后端 未结 2 1324
暖寄归人
暖寄归人 2020-12-30 08:21

I want to have a new folder containing a set of new html files. All the images inside it are in the format src=\"image.png\" and image.png is locat

2条回答
  •  春和景丽
    2020-12-30 08:27

    Use the element. It allows you to specify a URL for all relative URLs in a page.

    For example

    
    
        
            
            This is an example for the <base> element
            
        
        
            

    Visit the archives.

    The link in the this example would be a link to "http://www.example.com/news/archives.html".

    For you, the base URL may be something as simple as . This would make images specificed as src="image.png" resolve as "http://www.yoursite.com/image.png"

    See also https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base

提交回复
热议问题