gpt4 book ai didi

jquery - 禁用特定页面 ID 上的类继承

转载 作者:太空宇宙 更新时间:2023-11-04 14:46:59 24 4
gpt4 key购买 nike

我正在为网络应用程序使用 jQuery Mobile。在这个元素中,开发人员覆盖了一些主要的 jQuery Mobile 类,例如:

 .ui-btn-text
.ui-icon
.ui-btn-corner-all

例如:

.ui-btn-text {
color:#fff;
padding:6px 10px;
line-height:10px;
font-size:12px;
/*

some settings....

*/
}

我正在添加一些新的 input 并且它会自动继承自覆盖的类。我如何禁用在特定页面上继承的它,以便它可以与 jQuery Mobile 类一起使用,例如为 #pageTest 禁用它。

最佳答案

只需根据 jQuery mobile's stylesheet 将其重置回原始值即可.如果它是 jQuery 的未压缩版本,可以找到 here .

Here is an example of that in practice .对于你的例子,看起来像

#pageTest.ui-btn-text { position: relative; z-index: 1; }

唯一的其他选择是使用 javascript 并遍历类的每个实例。使用 jQuery 是最简单的:

$('.ui-btn-text').each(function() {
$(this).css({
'position' : 'relative',
'z-index':'1',
//etc...
});
});

关于jquery - 禁用特定页面 ID 上的类继承,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17783699/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com