How to change background color of jQuery UI Dialog?(如何更改 jQuery UI 对话框的背景颜色?)
问题描述
我很难弄清楚如何更改 jQuery UI Dialog
的背景颜色.
I am having tough time figure out how to change background color of jQuery UI Dialog
.
我看过很多关于如何更改/删除标题栏的参考资料,但没有看到整个背景,包括那些弯曲的角落.
I've seen many reference how to change/remove title bar but not entire background including those curvy corner.
这是我的尝试:
http://jsfiddle.net/dEvKb/11/
问题是.ui-widget-content只适用于对话框内的正方形区域,不包括弯角.
The problem is .ui-widget-content only applies to square area within the dialog but not including curvy corner.
我找到了一个类 .ui-corner-all 类,希望它能为整个背景着色,但只有一半的对话框是着色的.(你可以在 jsfiddle 中看到这个)
I found a class .ui-corner-all class hoping it will color the entire background but only half of the dialog is colored. (you can see this in the jsfiddle)
以前有人做过吗?
推荐答案
你可以这样用
http://jsfiddle.net/dEvKb/15/
您应该使用 !important 设置为所有班级背景.
You should set to all class background with use !important.
.ui-dialog,.ui-widget, .ui-widget-content, .ui-corner-all, .foo, .ui-draggable, .ui-resizable {background:yellow !important代码>}
这篇关于如何更改 jQuery UI 对话框的背景颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何更改 jQuery UI 对话框的背景颜色?


基础教程推荐
- 如何使用sencha Touch2在单页中显示列表和其他标签 2022-01-01
- 每次设置弹出窗口的焦点 2022-01-01
- 如何使用 CSS 显示和隐藏 div? 2022-01-01
- 什么是不使用 jQuery 的经验技术原因? 2022-01-01
- Node.js 有没有好的索引/搜索引擎? 2022-01-01
- 为什么我在 Vue.js 中得到 ERR_CONNECTION_TIMED_OUT? 2022-01-01
- 如何在特定日期之前获取消息? 2022-01-01
- Javascript 在多个元素上单击事件侦听器并获取目标 2022-01-01
- WatchKit 支持 html 吗?有没有像 UIWebview 这样的控制器? 2022-01-01
- jQuery File Upload - 如何识别所有文件何时上传 2022-01-01