课程表

Ext.js课程

工具箱
速查手册

Ext.js 主题

当前位置:免费教程 » JS/JS库/框架 » Ext.js

Ext.js提供了许多要在您的应用程序中使用的主题。 你可以添加不同的主题的经典主题,看到输出的差异,这是简单地通过替换主题CSS文件,如下所述。

海王星主题

考虑你最初的Hello World应用程序。 从应用程序中删除以下CSS:

  1. https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/theme-classic/resources/theme-classic-all.css

添加以下CSS以使用海王星主题:

  1. https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/theme-neptune/resources/theme-neptune-all.css

要查看效果,请尝试以下程序:

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <link href="https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/theme-neptune/resources/theme-neptune-all.css" rel="stylesheet" />
  5. <script type="text/javascript" src="/attachements/w3c/ext-all.js"></script>
  6. <script type="text/javascript">
  7. Ext.onReady(function() {
  8. Ext.create('Ext.Panel', {
  9. renderTo: 'helloWorldPanel',
  10. height: 200,
  11. width: 600,
  12. title: 'Hello world',
  13. html: 'First Ext JS Hello World Program'
  14. });
  15. });
  16. </script>
  17. </head>
  18. <body>
  19. <div id="helloWorldPanel" />
  20. </body>
  21. </html>

尝试一下


清爽主题

考虑你最初的Hello World应用程序。 从应用程序中删除以下CSS:

  1. https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/theme-classic/resources/theme-classic-all.css

添加以下CSS以使用海王星主题:

  1. https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/theme-crisp/resources/theme-crisp-all.css

要查看效果,请尝试以下程序:

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <link href="https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/theme-crisp/resources/theme-crisp-all.css" rel="stylesheet" />
  5. <script type="text/javascript" src="/attachements/w3c/ext-all.js"></script>
  6. <script type="text/javascript">
  7. Ext.onReady(function() {
  8. Ext.create('Ext.Panel', {
  9. renderTo: 'helloWorldPanel',
  10. height: 200,
  11. width: 600,
  12. title: 'Hello world',
  13. html: 'First Ext JS Hello World Program'
  14. });
  15. });
  16. </script>
  17. </head>
  18. <body>
  19. <div id="helloWorldPanel" />
  20. </body>
  21. </html>

尝试一下


海卫一主题

考虑你最初的Hello World应用程序。 从应用程序中删除以下CSS:

  1. https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/theme-classic/resources/theme-classic-all.css

添加以下CSS以使用Triton主题:

  1. https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/theme-triton/resources/theme-triton-all.css

要查看效果,请尝试以下程序:

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <link href="https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/theme-triton/resources/theme-triton-all.css" rel="stylesheet" />
  5. <script type="text/javascript" src="/attachements/w3c/ext-all.js"></script>
  6. <script type="text/javascript">
  7. Ext.onReady(function() {
  8. Ext.create('Ext.Panel', {
  9. renderTo: 'helloWorldPanel',
  10. height: 200,
  11. width: 600,
  12. title: 'Hello world',
  13. html: 'First Ext JS Hello World Program'
  14. });
  15. });
  16. </script>
  17. </head>
  18. <body>
  19. <div id="helloWorldPanel" />
  20. </body>
  21. </html>

尝试一下


灰色主题

考虑你最初的Hello World应用程序。 从应用程序中删除以下CSS:

  1. https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/theme-classic/resources/theme-classic-all.css

添加以下CSS以使用灰色主题:

  1. https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/theme-gray/resources/theme-gray-all.css

要查看效果,请尝试以下程序:

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <link href="https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/theme-gray/resources/theme-gray-all.css" rel="stylesheet" />
  5. <script type="text/javascript" src="/attachements/w3c/ext-all.js"></script>
  6. <script type="text/javascript">
  7. Ext.onReady(function() {
  8. Ext.create('Ext.Panel', {
  9. renderTo: 'helloWorldPanel',
  10. height: 200,
  11. width: 600,
  12. title: 'Hello world',
  13. html: 'First Ext JS Hello World Program'
  14. });
  15. });
  16. </script>
  17. </head>
  18. <body>
  19. <div id="helloWorldPanel" />
  20. </body>
  21. </html>

尝试一下

转载本站内容时,请务必注明来自W3xue,违者必究。
 友情链接:直通硅谷  点职佳  北美留学生论坛

本站QQ群:前端 618073944 | Java 606181507 | Python 626812652 | C/C++ 612253063 | 微信 634508462 | 苹果 692586424 | C#/.net 182808419 | PHP 305140648 | 运维 608723728

W3xue 的所有内容仅供测试,对任何法律问题及风险不承担任何责任。通过使用本站内容随之而来的风险与本站无关。
关于我们  |  意见建议  |  捐助我们  |  报错有奖  |  广告合作、友情链接(目前9元/月)请联系QQ:27243702 沸活量
皖ICP备17017327号-2 皖公网安备34020702000426号