How to make code neater in Dreamweaver?

只谈情不闲聊 提交于 2020-01-06 19:35:14

问题


is there any quick and easy way to convert code from looking like this:

<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>

to being nice and neat like this:

<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>

it would also make life easier if there was a button to put css in alphabetical order


回答1:


See these similar questions / answers:

  • Is it possible to auto-format your code in Dreamweaver?

  • dreamweaver CS5 code formatter

I do not have Dreamweaver installed myself, but according to this answer the following commands should be available:

  • Commands > Apply Formatting
  • Commands > Clean up HTML



回答2:


Try:

Command -> Apply Source Formatting


来源:https://stackoverflow.com/questions/12340396/how-to-make-code-neater-in-dreamweaver

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!