0

我有自定义图标显示为列表组件的披露图标。我做了CSS来做。我的图标颜色是灰色的。它显示为蓝色。

我的 CSS:

.myList .x-list-disclosure
{
    width:48px !important;
    height:48px !important;
    top:0px !important;
    margin:1em 0 0 0 !important;
    background-image:none !important;
    color:transparent !important;
    -webkit-mask-box-image:url('../resources/images/next.png') !important;
    -webkit-mask:none !important;
}

.x-list .x-list-disclosure:before {
  position:absolute;
  top:0;
  right:0;
  bottom:0;
  left:0;
  content:'';
  font-family:$font-family;
  color:transparent;
  font-size:48px;
  text-align:center;
  line-height:48px;
  text-shadow:none !important;
}

问题:我的图标显示蓝色(即使是浅灰色)的原因是
什么我使用的 CSS 有什么问题。

4

1 回答 1

0

This is because, in Sencha background-color of .x-list .x-list-disclosure class is #006bb6. And when you are using -webkit-mask-box-image, it is being transparent showing the background-color i.e. blue instead light gray. So if you wish to change the color of the icon, do this:

.myList .x-list-disclosure {
    background-color: grey !important;
}

I hope, my explanation satisfies your query.

于 2014-05-13T09:08:33.287 回答