我可以在不破坏其他UI组件样式的情况下删除jQuery UI选项卡的整个样式吗? [英] Can I remove the entire style of jQuery UI tabs without breaking the styles of other UI components?

查看:82
本文介绍了我可以在不破坏其他UI组件样式的情况下删除jQuery UI选项卡的整个样式吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想完全自定义jQuery UI选项卡而不破坏jQuery UI日期选择器的样式吗?那可行吗,还是我应该做一个自定义工作而不使用jQuery UI选项卡?

I want to fully customize jQuery UI tabs without breaking the styles of jQuery UI date picker? Is that doable or should I do a custom work and not use jQuery UI tabs?

推荐答案

$("#mytabs").tabs()

<div class="ui-tabs ui-widget ui-widget-content ui-corner-all" id="mytabs">
   <ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
     <li class="ui-state-default ui-corner-top ui-tabs-selected ui-state-active"><a href="#tabs-1">Nunc tincidunt</a></li>
      <li class="ui-state-default ui-corner-top"><a href="#tabs-2">Proin dolor</a></li>
   <div class="ui-tabs-panel ui-widget-content ui-corner-bottom" id="tabs-1">
      <p>Tab one content goes here.</p>
   </div>
    ...
</div>

此示例显示了可以应用的大多数ui类. 您可以将它们重置为例如仅限#mytab.

this example show most of the ui classes that may be applied.. you can reset them for children of e.g. #mytab only..

#mytab.ui-tabs {
    /* reset or overwrite everything you don't like */
}

#mytab li.ui-tabs-selected {
    /* reset or overwrite everything you don't like */
}

...

这并不完全舒适,但是允许您在其他任何元素中仍然使用说jQuery ui样式.

This is not exactly comfortable but allows you to still use say the jquery ui styles in any other element.

关于日期选择器,只要您确保保存内容的div中没有​​使用上面定义的样式,就可以了,大多数类都以".ui-datepicker-"或".ui-标签-",以免干扰..

about the datepicker, as long you make sure the styles defined above are not used in the divs that hold the content you should be fine, most of the classes are prefixed with ".ui-datepicker-" or ".ui-tabs-" anyway so they should't interfere..

这篇关于我可以在不破坏其他UI组件样式的情况下删除jQuery UI选项卡的整个样式吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆