为什么itemTpl无法识别css类?

时间:2013-05-22 00:06:19

标签: css extjs touch

我正在尝试使用css文件中定义的类(轮播广场)格式化从服务器检索的每条记录。我需要每个记录都显示在我视图的缩略图中。 但是,当我在itemTpl中的div中使用它时,什么都没有出现。为什么itemTpl无法识别该类?如果我使用外面的类(在cls :)中它被识别。

我在数据视图中的代码如下:

      xtype: 'dataview',
                                    store: {
                                        autoLoad: true,
                                        fields: ['Title', 'Description', 'State'],                                      

                                        proxy: {
                                            type: 'ajax',
                                            url: 'ws/idea/GetByState.php?title=&page=1',
                                            reader: {
                                                type: 'xml',
                                                record: 'WebIdea',
                                                rootProperty: 'GetByStateResult'
    }
                                        }
                                    },
                                    styleHtmlContent: true,
                                    cls: 'carousel-squares',
                                    itemTpl: '<div class="carousel-squares"><h3>{Title}</h3><p>{Description}</p></div>',
                                    flex: 1

我的css如下:

.carousel-squares {
    background-color: #fcfcfc;
    border: 2px solid #99cb39;
    width: 90%;
    height: 30px;
    margin: 20px 5px;
}

0 个答案:

没有答案