由于avalon以绑定属性实现对DOM的选择与操作,页面的美观与调试就变得至关重要。参照boostrap的HTML规范,制定如下
<div class="ui-dialog ui-widget ui-widget-content ui-corner-all ui-front"
data-drag-handle="handle"
data-drag-before-start="beforeStart"
ms-draggable
ms-visible="toggle"
ms-css-width="width"
ms-css-height="height"
tabindex="-1"
style="position: absolute;"
>
<div class="ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix" >
<span class="ui-dialog-title" >{{title|html}}</span>
<button class="ui-dialog-titlebar-close"
data-button-text="false"
data-button-icon-primary="ui-icon-closethick"
ms-widget="button"
ms-click="close"
type="button"
>close</button>
</div>
</div>
注,我们应该尽可能少用ID,因为较新的浏览器中,它们都学IE5那样直接把ID映射成一个全局变量,可能会引发各种奇怪问题。
标签名如有属性,第一个属性必须与它同行,第二个属性换行,位置于第一个属性对齐,其他属性照办
属性名必须小写, 属性值必须用双引号括起,对于表单元素的布尔属性(如checked, selected, disabled)直接忽略属性值
自闭包标签必须以“/>”结束,其他的格式都应为“<xxx>ffffffffffffffff</xxx>”
原文:http://www.cnblogs.com/rubylouvre/p/3642024.html