2017-09-25 175 views
1

我使用的離子2.現在正在開發的應用程序不appering,我有這種風格:離子3背景圖像SVG在離子視圖

ion-content { 
    background-image: url('/assets/images/orange-background.svg'); 
    background-repeat: no-repeat; 
    background-size: 101%; 
} 

當我ionic serve這工作得很好,但是當我上傳一個新版本到Ionic View頻道,這個例子不適用於background-image.svg的任何例子。

我已經試過Ionic - svg does not appear但沒有工作。

在此先感謝。

編輯1

我已經嘗試過的網址,background-image

assets/images/orange-background.svg 
/assets/images/orange-background.svg 
../assets/images/orange-background.svg 
./assets/images/orange-background.svg 

無的這個工作:「(

編輯2

我剛剛發現這個問題只發生在iOS上。

回答

0

也許這個網址是inco rrect。在.css文件中:url ('../assets/images/orange-background.svg')

在其他情況下,你是否有所作爲:在Whindows中,當你在瀏覽器中測試應用程序時,image.SVG將起作用,但在Linux(也稱爲Android)中不會。看起來,image.SVG與windows中的image.svg相同。

+0

感謝您的迴應,但這並沒有奏效。我添加了我嘗試過的所有網址的編輯。 –