在示例和示例中,我在许多不同的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>发布于 2014-01-23 19:38:58
来自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模板对象。
https://stackoverflow.com/questions/21317652
复制相似问题