开发者

How to make image of the button visible even after it is pressed in sencha

开发者 https://www.devze.com 2023-04-04 22:14 出处:网络
I am using sencha to create an application. In this i am using button which for which i have defined the icons.

I am using sencha to create an application. In this i am using button which for which i have defined the icons.

ex:

  • Sencha

    { xtype:'button', height:30, width:30, cls:'btn' }

  • CSS

    .btn { background:"../../resources/img/hosrse.png"; }

    开发者_C百科

But when i am clicking on the button the image is disappearing. What to do to keep the image appear even after pressing the button.


You need to overload the .x-button-pressed rule, i.e.

.btn.x-button.x-button-plain,
.btn.x-button.x-button-plain.x-button-pressed {
    background:"../../resources/img/hosrse.png";
}
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号