是否有任何快速简便的方法可以将代码转换为如下所示:

<style>
element { property:value; property:value;
property:value;
property:value; }

element { property:value; property:value; property:value; property:value; property:value; }
element {property:value; property:value; property:value;
property:value;
property:value; property:value;
}
</style>
<div>
content content content <div> content </div>
  </div>


这样变得很好和整洁:

<style>

element { property:value; property:value; property:value; property:value; }

element { property:value; property:value; property:value; property:value; }

element { property:value; property:value; property:value; property:value; }

</style>

<div>
content content content
      <div>
          content
      </div>
</div>


如果有一个按字母顺序排列css的按钮,它将也使生活更轻松

最佳答案

看到这些类似的问题/答案:


Is it possible to auto-format your code in Dreamweaver?
dreamweaver CS5 code formatter


我自己没有安装Dreamweaver,但是根据this answer,以下命令应该可用:


命令>应用格式
命令>清理HTML

关于css - 如何在Dreamweaver中使代码更整洁?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/12340396/

10-13 01:56