更改下拉dojo的字体大小,从商店加载选项

[英]Change font size for dropdown dojo where options are loaded from a store


I'm trying to decrease the font size of all the options in my dijit.form.Select box (dojo 1.6). I'm initializing and setting the options programmatically. How do I change the font size of the options in the dropdown? Please help.

我正在尝试减少dijit.form.Select框(dojo 1.6)中所有选项的字体大小。我正在以编程方式初始化和设置选项。如何更改下拉列表中选项的字体大小?请帮忙。

This is my current code:

这是我目前的代码:

// MONTH DROP-DOWN DECLARATION

// MONTH DROP-DOWN DECLARATION

        var MONTH = new dijit.form.Select({
            name        : "MONTH",
            options     : store,
            value       : this.fields['MONTH'].value,
            style       : { width: '125px' },
            maxHeight   : -1
        }, this.dapMONTH);

(I'm not sure on how to override the CSS theme used)

(我不确定如何覆盖使用的CSS主题)

Thanks.

1 个解决方案

#1


1  

Use the following CSS:

使用以下CSS:

.dijitSelectLabel {
  font-size:30px;      
}
.dijitMenuItemLabel{
    font-size:25px;
}

Live example:

https://jsfiddle.net/cz19fcpp/

Where in .dijitMenuItemLabel you can handle the font-size for items in the menu list, and in dijitSelectLabel you can set font-size for the selected item from the list.

在.dijitMenuItemLabel中,您可以处理菜单列表中项目的字体大小,在dijitSelectLabel中,您可以从列表中为所选项目设置字体大小。


注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:https://www.itdaan.com/blog/2015/11/26/f25e6bc5c50c7a58503c00be491c4258.html



 
粤ICP备14056181号  © 2014-2020 ITdaan.com