Article Introduction: Cssgaga Tutorial: Generate Datauri, extract pictures, download remote CSS files, image lossless compression. |
cssgaga– generates Datauri and MHTML
Before:
. Base64{background-image:url (' base64/logo.png ');
Base64{border-image:url (' Base64/logo.png ');}
Note: The Base64 folder of the picture file you want to convert is the relative path when the CSS is sibling and referenced
After:
. Base64{background-image:url (Data:image/png;base64,[base64 string])}
. Base64{border-image:url (data:image/ Png;base64,[base64 string])}
cssgaga– Extract Pictures
Check the picture
You can extract the picture referenced by the CSS file (jpg/gif/png) to the Img-css file name directory under the current directory, and replace the path to be extracted by the picture path
Note: A picture that supports relative address calls is not processed if the picture does not exist
cssgaga– Download Remote CSS file
Check the remote files to download the local CSS dragged in can be
Sometimes you need a line version, a file comparison, and so on, you can use this feature
Build Location: Remote folder in current directory
cssgaga– Image Lossless compression
*.png→*.png
*.gif→*.gif
Compress animated GIF only, static GIF please manually convert to Png8
*.jpg→*.jpg
Convert to progressive JPG if the file is greater than 10KB
When do I compress pictures?
- If you do not choose to sync, drag in the direct compression
- Base64 Coding Pre-compression
- Pre-sync compression
Note: Image compression will overwrite the original file, please back up yourself