CSS Charsets is a module of CSS that lets you specify the character set used in the style sheet.

参考

At-rules

规范

规范 状态 注释
CSS Level 2 (Revision 1)
The definition of '@charset' in that specification.
推荐 初始定义

浏览器兼容性

@charset rule

The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. 更新 GitHub 上的兼容性数据
Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
@charset Chrome 完整支持 2 Edge 完整支持 12 Firefox 完整支持 1.5 注意事项
完整支持 1.5 注意事项
注意事项 Firefox 1 supported an invalid syntax where the character encoding is not between single or double quotes.
IE 完整支持 5.5 注意事项
完整支持 5.5 注意事项
注意事项 From Internet Explorer 5.5 to IE 7 (inclusive), Internet Explorer supported an invalid syntax where the character encoding is not between single or double quotes.
Opera 完整支持 9 Safari 完整支持 4 WebView Android 完整支持 2 Chrome Android 完整支持 18 Firefox Android 完整支持 4 Opera Android 完整支持 10.1 Safari iOS 完整支持 4 Samsung Internet Android 完整支持 1.0

图例

完整支持

完整支持

见实现注意事项。

见实现注意事项。

元数据

  • 最后修改: