Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/ant/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
有没有办法让我的类覆盖jQuery主题';什么课?_Jquery_Css_Jquery Ui - Fatal编程技术网

有没有办法让我的类覆盖jQuery主题';什么课?

有没有办法让我的类覆盖jQuery主题';什么课?,jquery,css,jquery-ui,Jquery,Css,Jquery Ui,我是jQuery新手,对CSS类的主题覆盖有问题 以下是我的HTML代码: <head> .clicked { text-decoration: line-through !important; color: #000000; } </head> ... <div data-role="collapsible" data-theme="b" data-content-theme="b" data-collapsed icon="arro

我是jQuery新手,对CSS类的主题覆盖有问题

以下是我的HTML代码:

<head>
  .clicked
  {
    text-decoration: line-through !important;
    color: #000000; 
  }
</head>
...
<div data-role="collapsible" data-theme="b" data-content-theme="b" data-collapsed icon="arrow-r" data-expanded-icon="arrow-d">
  <ul data-role="listview" id="Key"></ul>
</div>
我计划使用toggleClass,因此此代码仅用于测试目的。 在查看Firebug时,我发现首选
a.ui-link-inherit

a.ui-link-inherit {
    text-decoration: none !important;
}
.clicked {
    color: #000000;
    text-decoration: line-through !important;
}
有没有办法让我的类覆盖jQuery主题的类?
我的目标是在用户单击给定的listview元素时切换“行通过”。

主题的CSS规则适用,因为它比您的更具体。解决办法是给你的规则增加更多的特殊性

a.ui-link-inherit.clicked {
    color: #000000;
    text-decoration: line-through !important;
}

演示:

非常感谢Juhana的回答。这是完美的工作!!
a.ui-link-inherit.clicked {
    color: #000000;
    text-decoration: line-through !important;
}