应用css到dijit按钮 [英] applying css to dijit button

查看:113
本文介绍了应用css到dijit按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下HTML和CSS:

 < button id =myBtndojoType =dijit.form。按钮>测试和LT; /按钮> 

#myBtn {
margin-left:100px;
}

CSS应该按下 100px 。但是由于 dijit 在按钮周围应用了一些额外的HTML层,按钮将获得一个 100px padding。



JSbin显示问题



编辑:找到一个(不是IE6兼容的)解决方案:

  widgetid = myBtn] {margin-left:100px; } 


解决方案

看到上面:-)环绕DIV和在您的静态CSS中使用该DIV。



我认为使用HTML进行装饰实际上可能比尝试更多地嵌入窗口小部件或窗口小部件的模板中更简单的解决方案。 >

I have the following HTML and CSS:

<button id="myBtn" dojoType="dijit.form.Button">Testing</button>

#myBtn {
    margin-left: 100px;
}

The CSS is supposed to push the button in 100px. But since dijit applies some extra layers of HTML around the button, the button gets a 100px padding.

JSbin to show the problem

edit: Found one (not IE6-compatible) solution:

[widgetid=myBtn] { margin-left: 100px; }

解决方案

see above :-) Surround with a DIV and use that DIV in your static CSS.

I think decorating with HTML may actually be a simpler solution than trying to bake more into the widget or the widget's template.

这篇关于应用css到dijit按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆