我正在设置dijit.form.HorizontalSlider
带有标签和规则的标签,但我无法让显示器正常工作。滑块显示在规则和标签的顶部。我可以看到放置标签和规则的 div 没有高度属性,我猜这就是我的问题,但我似乎无法修复它。
这是代码...
//create a div for the rule in my inner node div
this.ruleDiv = dojo.create("div", {}, dojo.byId("ruleDiv"), "first");
this.getInnerNode().appendChild(this.ruleDiv);
//create a div for the labels in my inner node div
this.labelsDiv = dojo.create("div", {},dojo.byId("labelsDiv"), "first");
this.getInnerNode().appendChild(this.labelsDiv);
//create the rule object
this.sliderLabelsRule = new HorizontalRule({
container: "topDecoration",
count: 10
}, this.getLabelsRuleDiv());
//create the labels object
this.sliderLabels = new HorizontalRuleLabels({
container: "topDecoration",
labelStyle: "font-size: 10px;",
labels: ["test0", "test1", "test2", "test3", "test4", "test5",
"test6", "test7", "test8", "test9"]
}, this.getLabelsDiv());
//create the slider
this.slider = new Slider({}, this.getInnerNode());
//startup the widgets
this.getSlider().startup();
this.getLabelsRule().startup();
this.getLabels().startup();
我试过交换东西并尝试了很多不同的方法,但我似乎找不到正确的组合,感谢任何帮助!