jQuery UI 对话框是透明的

标签 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>

当我调用这个对话框时它看起来是透明的,我怎样才能让它有不同的颜色?我浏览了文档,但找不到更改它的方法。谢谢。

最佳答案

您必须添加 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

关于jQuery UI 对话框是透明的,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25765832/

相关文章:

javascript - 为当前脚本添加过渡效果

javascript - 解析器错误语法错误: Unexpected number in JSON

html - 为什么 float 和 padding 组合导致元素通过边距?

jquery - 仅在折叠时将 jQuery-UI sortable() 应用于 Accordion() 元素

javascript - 突出显示 <TR> 整周日期选择器

javascript - Google Places API - 未捕获的语法错误 : Unexpected token :

javascript - chrome jquery 中的 "input"事件未触发

javascript - Html javascript 提交不同的表单相同的数据类型,2 个按钮

html - 嵌套 flexbox 优化

Jquery UI 可拖动不滚动可排序容器