[英]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.