[英]Custom CSS in Sencha Touch 2 app
快速问题,我一直在尝试更改我的Sencha Touch视图的背景颜色和背景图像,但似乎我无法正确实现此目的。
我已经试过了:
extend:'Ext.form.Panel',
requires: ['Ext.form.FieldSet', 'Ext.form.Password', 'Ext.Label', 'Ext.Img'],
config:{
title: 'Login',
style: {
background: "#000"
},
和这个:
extend:'Ext.form.Panel',
requires: ['Ext.form.FieldSet', 'Ext.form.Password', 'Ext.Label', 'Ext.Img'],
alias: 'widget.loginview',
style:{
background: '#000'
},
config:{
title: 'Login',
甚至通过使用cls添加CSS类:
extend:'Ext.form.Panel',
requires: ['Ext.form.FieldSet', 'Ext.form.Password', 'Ext.Label', 'Ext.Img'],
config:{
title: 'Login',
cls: 'custom-panel',
自定义面板定义为:
.custom-panel{
background-image: url('../images/bg.jpg');
}
我该如何进行这项工作?
尝试使用cls
baseCls
属性
extend:'Ext.form.Panel',
requires: ['Ext.form.FieldSet', 'Ext.form.Password', 'Ext.Label', 'Ext.Img'],
config:{
title: 'Login',
baseCls: 'custom-panel',
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.