jQuery UI对话是透明的

时间:2014-09-10 12:45:58

标签: jquery html jquery-ui

我有这个jQuery UI对话框:

<div id="dialog">
    <p>Add your thoughts</p>
    <textarea name = "textarea1" id = "textarea1" rows="4" cols="50"></textarea>
    <input type="submit" name="button" id="button1" onclick="myfunction()" value="Send!" />
</div>

当我调用此对话框时它看起来很透明,我怎样才能让它有一个独特的颜色?我浏览了文档,但我找不到改变它的方法。感谢。

2 个答案:

答案 0 :(得分:5)

您必须添加jQuery UI css参考

<link rel="stylesheet" href="//code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.1/jquery-ui.js"></script>

Demo

答案 1 :(得分:2)

使用!important设置为所有课堂背景。

{background:yellow !important}​

括号前面的类名

见这里:http://jsfiddle.net/dEvKb/15/