在示例和示例中,我已经在许多不同的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>
最佳答案
从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模板对象。