2013-08-20 74 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出錯,您的自定義主題不可用。確保你正在打包你的資源進入最後的戰爭。