我有自定义图标显示为列表组件的公开图标。我做了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有什么问题。
答案 0 :(得分:0)
这是因为,background-color
类的Sencha .x-list .x-list-disclosure
是#006bb6。当你使用-webkit-mask-box-image
时,它是透明的,显示背景颜色,即蓝色而不是浅灰色。因此,如果您想更改图标的颜色,请执行以下操作:
.myList .x-list-disclosure {
background-color: grey !important;
}
我希望,我的解释能满足您的疑问。