css - 如何使用 WebStorm 清理 CSS 中的代码
问题描述
有什么方法可以清理 WebStorm 上的代码?
我的意思是这样
清洁前
.container {
position: absolute;
background-color: #1e1939;
width: 100%;
top: 50%;
}
清洁后
.container {
width: 100%;
background-color: #1e1939;
position: absolute;
top: 50%;
}
Ctrl + Shift + Alt如果您使用 Android Studio,您会在输入 XML时理解我的意思。
解决方案
您可以使用 Code Style CSS 选项为您的 css 文件配置格式选项,看看:
https://www.jetbrains.com/help/webstorm/settings-code-style-css.html
看看“安排”部分。
捷径:Ctrl + Alt + S
推荐阅读
- python - 实现随机搜索的选项有哪些?
- scala - 在社区检测算法中选择什么样的变量来增加节点标签
- reactjs - 使用 React Hooks 设置时的无限循环
- sql - 如何用SQL总结分组结果的总和?
- java - java错误和异常处理
- php - 找不到类“TusPhp\Tus\Client”
- geometry - GeometryUtil.geodesicArea() 返回大量值
- docker - 为什么我不能运行 X11 应用程序?
- javascript - 使用fabric.js,我如何使用画笔从画布上的隐藏图像/图层复制叠加层
- flutter - Flutter Dropdownbutton小部件未打开