开发者

IE issue on dynamically setting the image

开发者 https://www.devze.com 2023-02-28 06:06 出处:网络
I have an xhtml file where I dynamically set the image\'s src using a bean. <h1 class=\"logo\" style=\"background-image: url(#{mainMenuNavigationBean.headerImage});\">

I have an xhtml file where I dynamically set the image's src using a bean.

<h1
  class="logo"
  style="background-image: url(#{mainMenuNavigationBean.headerImage});">

and my method returns something like:

return "/resources/images/header/logo.png";

This works perfectly in Chrome but not i开发者_JAVA技巧n IE (it puts background-image: none;).

Do you see why?

UPDATED: The code is fine...suddenly started to work...


Try adding .. before the path. like:

return "../resources/images/header/logo.png";

0

精彩评论

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