如何切换 extjs 主题? [英] how to swtich extjs themes?

查看:23
本文介绍了如何切换 extjs 主题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我注意到 extjs 带有 3 到 4 个默认主题/皮肤.如何在主题之间进行选择或切换?

I noticed that extjs comes with 3 to 4 default themes/skins . How can I select or swtich between the themes?

我想更改蓝色以选择灰色主题或其他内容.

I want to change the blue to select the grey themes or something else.

谢谢

推荐答案

Ext.util.CSS.swapStyleSheet 函数可以用来切换不同的主题, 论坛帖子显示了一个示例.

Ext.util.CSS.swapStyleSheet function can be used to switch between the different themes, this forums post shows an example.

此外,我最初在我的应用程序中实现了这一点,但我最终发现强制浏览器刷新是必要的,而不是动态交换 CSS,因为仍然会存在一些奇怪的大小/定位问题.这主要是在可访问性主题之间切换时.

Also I implemented this at first in my app a while back, but I ultimately found that forcing a browser refresh was necessary instead of dynamically swapping the CSS as there would still be some weird sizing/positioning issues. This was mainly when switching between the accessibility theme.

这篇关于如何切换 extjs 主题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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