实现Meebo风格的浮动窗口的最佳方式是什么?我更喜欢使用 Prototype (但如果有一个好的 Jquery 实现,我也很乐意研究它)。我希望窗口可拖动/可调整大小,并且通常“轻量级”且响应灵敏。
您可能想查看 jQuery UI 中的对话框组件。它是 jQuery 提供的官方 UI 库的一部分。下载 jQuery 和 jQuery UI,然后确保您的页面中引用了这两个脚本。然后,就像在 jQuery 对象上调用dialog() 一样简单。查看对话框文档以获取更多信息。
<script type="text/javascript">
$(function() {
$("#dialog").dialog();
});
</script>
<div id="dialog" title="Basic dialog">
<p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p>
</div>
另请参阅:https://riversun.github.io/jsframe/ - 用纯 Javascript 编写: