2013-08-20 75 views
0

我有自定义主题在/ kopiMapReportGeneration /的WebContent/VAADIN /主题我VAADIN应用程序,我想改变的进展idicator在style.css中:Vaadin主题更改

.v-loading-indicator, .v-loading-indicator-delay, .v-loading-indicator-wait { 
    width: 100%; 
    height: 100%; 
    margin: 0; 
    background-position: 50%; 
    background-image: url("../customThemes/img/progress.gif"); 
    background-color: gray; 
    opacity: .8; 
    -ms-filter: alpha(opacity=80); 
    filter: alpha(opacity=80); 
    background-repeat: no-repeat; 
    background-attachment: fixed; 
} 

这里的图像路径/WebContent/VAADIN/themes/customThemes/img/progress.gif 的问题是没有考虑到css的变化。

+0

你有setTheme(“customThemes”)设置你的主题; ? – nexus

回答

4

我有几点:

  1. style.css被缓存,以便任何改变你的CSS后,你应该清除浏览器缓存,以获取新的资源style.css
  2. 您的应用程序和主窗口应该有setTheme("customThemes");
  3. background-image: url("img/progress.gif");是足够了,但background-image: url("../customThemes/img/progress.gif");应该工作了。

修复:

  1. 通过检查元素searach你的HTML页面<link rel="stylesheet" type="text/css" href="/context-if-any/VAADIN/themes/customThemes/styles.css">HEAD元素。它应该在那里。
  2. 访问的CSS资源,并确保它是最新的,它没有被缓存
  3. 确保您/context-if-any/VAADIN/themes/customThemes/img/progress.gif资源是通过Web浏览器访问

Conlusion:

如果固定1已链接其他主题。 - >在你的应用中使用setTheme()方法实验

如果修复2有缓存的css资源。点击ctrl + F5硬刷新或清除浏览器缓存。

如果修复3出错,您的自定义主题不可用。确保你正在打包你的资源进入最后的战争。