2013-03-16 3 views
2

아래 코드는 패널 주위의 테두리 색만 변경하지만 패널 자체는 변경하지 않습니다.sencha에서 오버레이 패널에 투명한 배경을 터치하는 방법

var overlay = Ext.Viewport.add({     
    xtype: 'panel', 
    centered: true, 
    style:'background-color: transparent;', 
    modal: { 
     style: 'opacity: 0' 
    }, 
    hideOnMaskTap:true, 
    width:'20%', 
    height: '50%', 
    styleHtmlContent:true, 
    items:[{ 
     xtype:'button', 
     test:'hey', 
     cls:'notrans', 
     style: 'opacity: 1' 
    }] 
});    

답변

5

당신은 을 중심으로 할 때 패널의 x-panel-inner CLS를 변경해야합니다. 따라서 패널에 cls을 입력하면됩니다 (예 : cls: my-panel). 사용자 정의 스타일 시트 이제

var overlay = Ext.Viewport.add({ 
    xtype: 'panel', 
    centered: true, 
    style:'background-color: transparent;', 
    cls: 'my-panel', 
    .... 
});    

:

.my-panel .x-panel-inner { 
    background-color: transparent !important; 
} 

그래서 지금을 중심으로 패널의 배경을 투명하게해야한다.

+0

내부 배경 변경이 검은 색으로 변경되었습니다. – Jayrok94

+0

'style' 설정이'background-color : transparent; '로 설정되어 있는지 확인하십시오. – cclerville

+0

감사합니다 !! 그것은 잘 작동 – Jayrok94

관련 문제