最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
基于JavaScript实现窗口拖动效果的教程
时间:2017-02-06 编辑:简简单单 来源:一聚教程网
写法类似于上一篇,水平进度条拖拽,具体内容如下
代码如下 | 复制代码 |
*{ margin: 0; padding: 0; } .nav{ width: 100%; height: 20px; background-color: #ccc; } .popup{ width: 300px; height: 300px; border: 1px solid red; position: absolute; left: 50%; top: 50%; margin-left: -150px; margin-top: -150px; } .popup .title{ height: 20px; width: 100%; background: deeppink; cursor: move; }
|