How CSS encoding is converted

Source: Internet
Author: User
How does the code for CSS change? Why convert CSS file encodings? How to set CSS file encoding? Why is the CSS file encoding converted? Today we will give you a detailed introduction

CSS encoding conversion CSS file encoding settings, CSS file Utf-8 and gb2312 Mutual Conversion method Chapter

View CSS file encoding

High-build DW new will bring your own encoded CharSet code

In the CSS file does not have code declaration code does not mean that the CSS file does not encode this feature, in the high-level DW software, the new CSS file will be automatically added on the code declaration.

CharSet declaration in CSS

High-version DW new CSS file comes with code CharSet declaration

No charset encoding code found in CSS file How do I see the encoding type?

View current CSS Encoding mode

CSS code editing area in the lower right corner can see the current CSS encoding mode

How to convert a CSS file encoding (Interchange method)

Regardless of whether there is a charset in the CSS file code, you can see the encoding type in the lower right corner of the DW software code editing area. But if you want to modify the CSS document encoding can not directly add or modify the value of charset even if the code changes, so direct modification is not possible.

Cannot change CSS encoding type at all

Directly modifying the CharSet value in the document code does not change the document encoding type at all

Before the change is Utf-8 encoding type, this example changes the Utf-8 conversion to gb2312.

Find DW software at the top of the status bar "modify" Select Click "Page Properties" (or shortcut key ctrl+j)

Page Properties Selection

Page Properties Selection

Select Document Encoding Type value

In the popup Page Properties tab, document encoding this column expands selection

Select CSS Document encoding

Expand document Encoding Select "Simplified Chinese (GB2312)"

Step three: After selecting a good encoding type, click "OK"

Click the Confirmation Page Properties tab

Click the Confirmation Page Properties tab

This will actually convert the "UTF-8" encoded CSS file to a "GB2312" encoded document.

After changing the conversion encoding, the CSS file document remains gb2312 encoded even if you manually delete the CSS code in @charset "gb2312".

CSS Encoding Conversion Summary

Remember to modify the CSS code file encoding, you can not just manually modify the @charset value to think that the code conversion conversion, it is necessary to use the DW software conversion operation to completely truly convert the CSS document encoding type.

Related reading:

CSS3 Click to display the ripple effect

CSS3 How to make butterflies dancing animation

How to make a particle fountain animation with canvas

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.