Cssgaga Tutorial: Generate Datauri, extract pictures, download remote CSS files, image lossless compression

Source: Internet
Author: User
Tags base64 relative string

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



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.