visual-studio-2010 - 格式化 css 样式

标签 visual-studio-2010 visual-studio css formatting

我有一个很大的 css 文件,其中包含这样的 css 规则格式:

.rounded-block
{
   border: 1px solid #c0c0c0;
   width: 500px;
   margin: 15px 0 15px 0;
}

我需要像这样格式化这个文件

.rounded-block{border: 1px solid #c0c0c0;width: 500px;margin: 15px 0 15px 0;}

我该怎么做?我可以在 visual studio 中做这个吗?

编辑: 我需要另一条规则在另一行

.rounded-block{border: 1px solid #c0c0c0;width: 500px;margin: 15px 0 15px 0;}
.anotherrule{margin: 15px;}

最佳答案

检查这些 CSS 美化器的 URL 并进行优化:

cssbeautify
fwpolice

在那里你可以定义你自己的规则:

codebeautifier .

关于visual-studio-2010 - 格式化 css 样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15925112/

相关文章:

visual-studio-2010 - 元素 'tr' 不能嵌套在元素 'tr' 中

c# - 无法映射路径“/”

windows - 混合来自不同版本的 Visual Studio 的库时的运行时问题

visual-studio - Visual Studio Cloud 如何查看我的负载测试在云中运行时发生的错误和警告?

jquery - 溢出在 jQuery slider 上无法正常工作

c++ - MS VC2010 - 双向斜线路径

c++ - OpenCV 2.3 中的 VideoCapture 问题

c# - 获取 "Tuple element name is inferred. Please use language version 7.1 or greater to access an element by its inferred name."

javascript - 在移动设备上移动元素

html - 转换背景和固定位置时如何摆脱重叠?