![](/img/trans.png)
[英]canvas.toDataURL('image/svg+xml') returning "data:image/png;base64..."
[英]How to convert data:image/svg+xml;base64 data from natural image?
我有一個博客 ,我需要在其中替換.svg-icon.googleplus
的background-image
(樣式表的第725行) 。
至此,它顯示了Google+圖標 。 我需要用Google的原始圖標替換它。 但是我不知道如何從自然圖像轉換data:image/svg+xml;base64
數據。
有什么建議嗎,好心的人?
您可以在后台url()中使用任何類型的圖像。 不需要是base64。 您可以將其替換為:
background-image: url('path/to/img/example.jpg');
background-image: url('path/to/img/example.gif');
background-image: url('path/to/img/example.png');
但是,如果您仍然想使用Base64,則可以使用如下程序或Web服務:
希望能幫助到你
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.