Data: [<MIME-type>] [; base64], <data>
The format is relatively simple. We can see that the above is a base64 encoded jpg image.
Embedded in this page, the following is displayed:
According to the above format, we can write a small program to generate, but we don't need to be so troublesome. Many websites provide this (free) service.
1. http://dataurl.sveinbjorn.org/dataurlmaker
Provides preview for convenient copying.
2. http://websemantics.co.uk/online_tools/image_to_data_uri_convertor/
Provides preview and generates the URI data of the corresponding CSS.
3. http://software.hixie.ch/utilities/cgi/data/data
Tip: generation is not limited to image data. You can use three methods (see steps 1, 2, and 3) to specify the encoding method, but the interface is unfriendly.
Click:
In the following window, use any of the above URLs to generate image data, copy and paste the data to the image address text box:
Click Insert. OK, for example:
View effects: http://space.cnblogs.com/group/topic/41938/