[英]Change JQuery Row Color
I am creating a collapsable list of elements, that has a filter at the top. 我正在创建一个可折叠的元素列表,该列表顶部有一个过滤器。 However, when a user taps on the table row on iOS devices, the row becomes blue for a second.
但是,当用户在iOS设备上点击表格行时,该行将变为蓝色一秒钟。 This color does not match the color scheme of my project, and so I am wondering if someone knew how to change the color.
该颜色与我的项目的配色方案不匹配,因此我想知道是否有人知道如何更改颜色。 JQuery, JQuery Mobile, and the CSS file are all local to the machine.
JQuery,JQuery Mobile和CSS文件都是计算机本地的。
Here is a screenshot of the issue in the iOS Simulator: 这是iOS模拟器中问题的屏幕截图:
Here is a live preview of my project: http://jsfiddle.net/jakechasan/M7LLU/ 这是我的项目的实时预览: http : //jsfiddle.net/jakechasan/M7LLU/
I have tried using the following with no luck: 我尝试使用以下方法没有运气:
.highlight {
background-color: red;
}
You need to override ui-btn-active
, this class is added by jQM to any element that accommodates a
tag. 你需要重写
ui-btn-active
,这个类是由JQM加入到容纳任何元素a
标签。
Override .ui-btn-active
default CSS properties followed by !important
to force override. 覆盖
.ui-btn-active
默认CSS属性,后跟!important
强制覆盖。
background-color:#38c;
border-color:#38c;
color:#fff;
text-shadow:0 1px 0 #059
You can either override it to change its' color on all elements with a
tag, 您可以覆盖它来改变它的颜色上的所有元素有
a
标签,
.ui-btn-active {
background-color: newColor !important;
}
Or specifically on some widgets , eg collapsible . 或专门用于某些小部件 ,例如可折叠的 。
.ui-collapsible .ui-btn-active {
background-color: newColor !important;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.