如何覆盖jQuery UI小部件样式和保持功能 [英] How to override jQuery UI Widget Styles and Keep the Functionality

查看:274
本文介绍了如何覆盖jQuery UI小部件样式和保持功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我针对内部应用程式使用 jQuery UI






我正在寻找一个简单的方法来删除jQuery UI在给定的widget实例上提供的所有样式信息。我开放真正的任何东西,但一个可重用的javascript解决方案将是完美的。



最重要的是所有背景图片都被移除,



$ b

  $ tabs = $(#someElement)。tabs(); 
$ tabs.removeStyles();

但我愿意允许我以灵活的方式修改窗口小部件样式。 >

最终目标是尽可能多地控制样式

解决方案

为了覆盖jquery-ui css,使用!important 标签。

  .ui-dialog {
background-color:black!important;
}


I am using jQuery UI for an in-house application.


I am looking for an easy way to remove all style information provided by jQuery UI on a given widget instance. I'm open to really anything, but a reusable javascript solution would be perfect. It's absolutely imperative that no functionality is lost.

the most important thing is that all background-images are removed, I'm ok with keeping the layout styles.

ideally something like...

$tabs = $("#someElement").tabs();
$tabs.removeStyles();

But I'm open to whatever allows me to modify widget styles in a flexible way.

The end goal is to have as much control of styles as possible

解决方案

In order to override the jquery-ui css use the !important tag.

.ui-dialog {
  background-color: black !important;
  }

这篇关于如何覆盖jQuery UI小部件样式和保持功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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