如何转换数据:image / svg + xml;来自自然图像的base64数据?

时间:2016-07-06 17:22:46

标签: javascript html css svg icons

我有一个blog我需要替换X (line 725 of the stylesheet)Y

截至目前,它显示Google+ icon。我需要用Google's original icon替换它。但是我不知道如何从自然图像中转换x数据。

任何建议,善良的人?

1 个答案:

答案 0 :(得分:2)

您可以在后台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,你可以使用像这样的程序或网络服务:

https://www.base64-image.de/

希望有所帮助