CSS格式化与美化工具
为压缩后的CSS添加适当的缩进、换行和间距进行格式化。
如何使用本工具
- 1
Paste your minified or unformatted CSS into the text box.
- 2
Read the formatted result that appears instantly in the output panel below.
- 3
Select the output text and copy it (Ctrl/Cmd+C) into your stylesheet or editor.
- 4
Tweak the input and the output re-formats live as you type.
什么是CSS格式化与美化工具?
压缩后的CSS是去除了所有空白的单行代码。本工具会恢复其可读性:每个属性独占一行,在花括号内缩进,规则之间留一个空行。输出在功能上完全相同,只是更易于阅读或编辑。
常见使用场景
Un-minifying a production .css file you pulled from a CDN so you can read what a rule actually does.
Cleaning up CSS that was pasted as a single line out of browser DevTools or a build artifact.
Tidying inconsistent indentation in a hand-edited stylesheet before committing it to version control.
Making a vendor or third-party widget stylesheet legible enough to override specific properties.
Preparing a readable CSS snippet to paste into a blog post, tutorial, or Stack Overflow answer.
Quickly inspecting the structure of an unfamiliar stylesheet to find where a selector is defined.
常见问题
它会保留注释吗?▼
相关工具
JWT解码器
即时解码JSON Web Token(JWT)。完全在你的浏览器中运行:令牌绝不会离开你的设备,可安全用于生产环境的密钥。
JSON格式化与校验工具
在线格式化、校验和压缩JSON。完全在你的浏览器中运行:你的数据永远不会离开你的设备。
XML格式化工具
格式化并美化XML文档。适用于SOAP、站点地图、RSS订阅源和配置文件。
Base64编码与解码工具
将字符串编码为Base64,或将Base64解码为文本。尊重你的隐私:全部在你的浏览器中运行。
URL编码与解码工具
将文本转换为URL安全的编码(百分号编码),或进行反向转换。适用于查询字符串、重定向和OAuth流程。
HTML实体编码与解码工具
将特殊字符转换为HTML实体(&、<等),或进行反向转换。适用于将文本安全地嵌入HTML。