zyl324 2010-11-01 22:54
浏览 330
已采纳

Ext样式设置,望高手解决

问题是这样的,引用Ext到JSP中后,加载后就会出现所有的图片都会出现比较粗的border,完全失去了EXT的美化效果,其中一段代码如下:

<link rel="Stylesheet" type="text/css"
            href="../ExtJS/resources/css/ext-all.css" />
        <!-- 样式文件 -->
       
        <script type="text/javascript" src="../ExtJS/adapter/ext/ext-base.js"></script>
        <script type="text/javascript" src="../ExtJS/ext-all.js"></script>

       .....

 

 

js如下:

var url = "TreeAjax.jsp";
    var loader = new Ext.tree.TreeLoader({url:url});
    var root = new Ext.tree.AsyncTreeNode
    ({
        id:"0",
        text:"系统管理",
        leaf:false,
        loader:loader,
        expandable:true,
        expanded:true
    });
    var tree = new Ext.tree.TreePanel
    ({
        id:"tree",
        root:root,
        //singleExpand:true,//切换关闭其他兄弟节点
        autoHeight:true,
        autoWidth:true,
        frame:false,        
        animate:true
    });   
   
    tree.on("contextmenu",function(node,e)
            {
                var treeMenu = new Ext.menu.Menu
                ([
                    {xtype:"button",text:"打开",icon:"../ExtJS/examples/shared/icons/fam/plugin.gif",pressed:true},
                    {xtype:"button",text:"添加",icon:"../ExtJS/examples/shared/icons/fam/plugin.gif",pressed:true},
                    {xtype:"button",text:"编辑",icon:"../ExtJS/examples/shared/icons/fam/plugin.gif",pressed:true},
                    {xtype:"button",text:"隐藏",icon:"../ExtJS/examples/shared/icons/fam/plugin.gif",pressed:true},
                    {xtype:"button",text:"删除",icon:"../ExtJS/examples/shared/icons/fam/plugin.gif",pressed:true}
                              
                ]);
                treeMenu.showAt(e.getPoint());
            });

 

我在页面中重写了样式如下:

div,td,span,img{
                border:none;
                font-family: '微软雅黑'
            }

也没有效果

页面截图

页面展示效果如下,看下图片就知道了,

补充:

在发出问题后我又试了下,把此JSP放到EXT文件夹下的/examples/portal/下就没有以上问题

  • 写回答

2条回答 默认 最新

  • lizhiyezi 2010-11-05 21:51
    关注

    不需要写一堆脚本。你只需要设置Ext.BLANK_IMAGE_URL属性就行了。你可以修改ext源代码修改这个属性。或者写在Ext-all.js 后面也行。这样的话其他地方就不并要都写相同代码了。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 c程序不知道为什么得不到结果
  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置