开发者

How to set the background of jQueryUI Dialog for v1.8x

I'd like to provide a .png that renders as the background of a jQueryUI-based dialog object. This posting references the use of an 'overlay:' parameter but 'overlay' is not listed in the current documentation.

What's the current method to a开发者_JAVA技巧chieve this effect?

thx


You could use CSS to accomplish this. Just set a background-image: url(...) on the div you're making into a dialog (here's more about background-image).

Here's an example: http://jsfiddle.net/andrewwhitaker/S5pmw/

Edit: Just looking at the 1.6 code, it looks like you could specify CSS rules for the overlay that appears behind the dialog (if you specify modal). It doesn't control the actual background of the dialog itself, and it looks like this option was removed in 1.7(3). Here's a related jQuery forum thread about the option. Excerpt:

The overlay option was removed in favor of defining styles in your stylesheet. The overlay div has a class of ui-widget-overlay.

So to accomplish the behavior the overlay option gave you, you just need to define CSS rules for ui-widget-overlay.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜