尝试在jquery-ui范围容器中使用非范围的jqueryui小部件

时间:2010-02-16 18:09:51

标签: jquery html css jquery-ui themes

我的页面样式有一个范围的jquery ui主题。

我想在此布局中使用未编码的ui组件(用户将使用themeswitcher实用程序来自定义其“自定义组件”的外观。)

像这样

<div class="my-theme">
    content and a bunch of widgets here

    <div class="unscoped-theme">
        i want this div to effectively ignore the 'my-theme' css
    </div>
</div> 

我还考虑过将'unsofped-theme'移动到'my-theme'div之外,但这就是创建它自己的问题,试图将它放在页面上

任何帮助非常感谢!!

1 个答案:

答案 0 :(得分:0)

您无法阻止继承级联,您只能在级联的后期覆盖它,或者具有更高的特异性。所以......

.my-theme{font-weight: bold}
.my-theme .unscoped-theme{font-weight: normal}