javascript - 在窗口的左上角创建一个模式

标签 javascript jquery html css jquery-ui

我有一个使用 Jquery UI 库(http://jqueryui.com/dialog)创建的模式。下面是我的代码:

$("#mypreview_modal").dialog({
    autoOpen: false,
    draggable: true,
    height: 520,
    modal: true,
    resizable: false,
    width: 525, 
    buttons: {
        "Print": function() {                                  
        },
        "Close": function() {                   
          $( this ).dialog( "close" );
        }
    }        
}); 

我想将对话框放置在窗口的左上角,右垂直滚动条位于窗口的右上角。

enter image description here

最佳答案

#mypreview_modal {
  position: absolute;
  top: 0px;
  left: 0px
}

关于javascript - 在窗口的左上角创建一个模式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29073106/

相关文章:

javascript - 有缺陷的 IndexedDB 实现的特征检测?

javascript - 来自窗口模式的 PHP POST 数组

jquery - FormData.get 和 set 在边缘浏览器和 IE 中均不起作用

javascript - jQuery for 循环不运行函数

javascript - 自动递增注册ID

java - 将 javascript Web 应用程序链接到 java

javascript - 当宽度变窄时,VideoJS 控件(CC、音频)是否应该出现在视频元素下方?

javascript - 使用 jQuery 确定元素的类

HTML 签名,图像没有放在文本旁边

单击按钮时显示 DIV 容器的 Javascript 函数