मैंने extjs4 का उपयोग कर टॉगल बटन समूह बनाया है। जब मैं एक बटन दबाता हूं, तो अन्य बटन दबाए जाते हैं। फिर मैं दबाए जाने के बाद बटन की पृष्ठभूमि छवि को बदलना चाहता हूं। तो मैं "दबाए गए सीएलएस" का उपयोग करता हूं। कोड:extjs4 में बटन की पृष्ठभूमि छवि को बदलने के लिए प्रेसडक्ल का उपयोग कैसे करें?
Ext.define('Crm.view.CrmNavi', {
extend: 'Ext.toolbar.Toolbar',
height: 27,
initComponent: function() {
var me = this;
Ext.applyIf(me, {
items: [
{
cls: 'navi_btn',
overCls: 'navi_btn_over',
pressedCls: 'navi_btn_pressed',
xtype: 'button',
height: 24,
flex: 4,
html: 'button one'
toggleGroup: 'crmNaviBtnGroup',
enableToggle: true,
pressed: true
},
{
cls: 'navi_btn',
overCls: 'navi_btn_over',
pressedCls: 'navi_btn_pressed',
xtype: 'button',
height: 24,
flex: 4,
margin: '0 0 0 0',
html: 'button two',
toggleGroup: 'crmNaviBtnGroup',
enableToggle: true
}
]
});
}
});
//-----------------------------------------------------------
.navi_btn{
font-family: MicroSoft YaHei;
font-weight: 5;
font-size: 15px;
text-align: center;
color: #006f61;
}
.navi_btn_over{
font-family: MicroSoft YaHei;
font-weight: 3;
font-size: 15px;
text-align: center;
color: #ffffff;
background-image: url("images/crmNaviBtnPressed_bg.png");
background-repeat: repeat-x;
}
.x-navi_btn_pressed{
font-family: MicroSoft YaHei;
font-weight: 3;
font-size: 15px;
text-align: center;
color: #ffffff;
background-image: url("images/crmNaviBtnPressed_bg.png");
background-repeat: repeat-x;
}
// ------------------------------------- -----------------------------
यह Google क्रोम पर अच्छी तरह से काम करता है। लेकिन IE8 पर, पृष्ठभूमि छवि सेटिंग्स काम नहीं करती हैं (फ़ॉन्ट सेटिंग्स अच्छी तरह से काम करती हैं)। तो, क्या कोई समस्या इस समस्या को हल कर सकती है?
क्या आप अपना css navi_btn_pressed के लिए पोस्ट कर सकते हैं? –
जबकि "navi_btn_pressed" काम नहीं किया, मैंने सीएसएस फ़ाइल में "nav-_btn_pressed" में "x-" जोड़ा। आप देखते हैं, मैंने सीएसएस को "ओवर" और "दबाने" के लिए पोस्ट किया था। – user1011934
क्या आपको अभी यह काम मिल गया है? – pacman