我在示例和示例中看到了许多不同HTML元素的类dijitReset
,但是我找不到这个类的用途的解释。以下是dijit.form
文档中的示例(无解释):
<span class="dijit dijitReset dijitLeft dijitInline"
data-dojo-attach-event="ondijitclick:_onButtonClick,onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse"
><span class="dijitReset dijitRight dijitInline"
><span class="dijitReset dijitInline dijitButtonNode"
><button class="dijitReset dijitStretch dijitButtonContents"
data-dojo-attach-point="titleNode,focusNode"
name="${name}" type="${type}" value="${value}" role="button" aria-labelledby="${id}_label"
><span class="dijitReset dijitInline" data-dojo-attach-point="iconNode"
><span class="dijitReset dijitToggleButtonIconChar">✓</span
></span
><span class="dijitReset dijitInline dijitButtonText"
id="${id}_label"
data-dojo-attach-point="containerNode"
></span
></button
></span
></span
></span>
答案 0 :(得分:3)
来自Dojo源代码文件dijit.css
:
.dijitReset
{
/* Use this style to null out padding, margin, border in your
template elements so that page specific styles don't break them.
- Use in all TABLE, TR and TD tags.
*/
margin:0;
border:0;
padding:0;
line-height:normal;
font: inherit;
color: inherit;
}
因此,它旨在为边距,边框和填充重置特定于页面的样式,以便它们不会破坏您的Dojo模板对象。