开发者

background-image won't appear when used in combination with ajax and url rewrite rules

开发者 https://www.devze.com 2023-03-14 13:45 出处:网络
I have the following site layout. Main page is being loaded using url rewriting rules (apache) eh. www.page.com/section/information. There is a right hand side panel on this page. Content of that pane

I have the following site layout. Main page is being loaded using url rewriting rules (apache) eh. www.page.com/section/information. There is a right hand side panel on this page. Content of that panel is being loaded with ajax in and contains few divs with background-image style set on it. Problem is, that background image is not being displayed

Now, if I use standard string url (www.page.com/?action=section&title=information), that b开发者_Go百科ackground-image appears. It also appears when inserted as (using / as a prefix to indicate absolute path), even when rewritten url is used

So now I'm puzzled cause I basically can't see way out


You can either use absolute image paths or put this into your header

<base href="http://www.page.com/" />


I think in src attribute you have relative path of image try with absolute path of image.

0

精彩评论

暂无评论...
验证码 换一张
取 消