首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >dijitReset类是用来做什么的?

dijitReset类是用来做什么的?
EN

Stack Overflow用户
提问于 2014-01-23 19:31:45
回答 1查看 1.5K关注 0票数 2

在示例和示例中,我在许多不同的dijitReset元素上看到了类,但我找不到这个类的目的的解释。下面是dijit.form文档中的一个示例(没有解释):

代码语言:javascript
复制
<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">&#10003;</span
              ></span
              ><span class="dijitReset dijitInline dijitButtonText"
                  id="${id}_label"
                  data-dojo-attach-point="containerNode"
              ></span
          ></button
      ></span
  ></span
></span>
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-01-23 19:38:58

来自Dojo源代码文件dijit.css

代码语言:javascript
复制
.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模板对象。

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/21317652

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档