- ubuntu12.04环境下使用kvm ioctl接口实现最简单的虚拟机
- Ubuntu 通过无线网络安装Ubuntu Server启动系统后连接无线网络的方法
- 在Ubuntu上搭建网桥的方法
- ubuntu 虚拟机上网方式及相关配置详解
CFSDN坚持开源创造价值,我们致力于搭建一个资源共享平台,让每一个IT人在这里找到属于你的精彩世界.
这篇CFSDN的博客文章支持IE,firefxo,chrome浏览器下鼠标拖动和拖拽的鼠标指针特效由作者收集整理,如果你对这篇文章有兴趣,记得点赞哟.
核心代码:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
<!DOCTYPE html>
<html xmlns=
"http://www.w3.org/1999/xhtml"
>
<head>
<meta http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
/>
<title>鼠标拖动和拖拽的鼠标指针特效</title>
<style>
#box{width:100px;height:100px;background:#966;position:absolute;left:100px;top:100px;cursor:pointer;}
</style>
</head>
<body>
<div id=
"box"
></div>
<script>
var
doc=document;
function
getViewport(){
return
{width:Math.max(document.documentElement.clientWidth,document.documentElement.scrollWidth),
height:Math.max(document.documentElement.clientHeight,document.documentElement.scrollHeight)
};
}
function
compareNum(x,minNum,maxNum){
switch
(
true
){
case
x<minNum:x=minNum;
break
;
case
x>maxNum:x=maxNum;
break
;
default
:x;
}
return
x;
}
box.style.left=
'100px'
box.style.top=
'100px'
box.onmousedown=
function
(e){
var
e=e||window.event;
var
maxL=getViewport().width-100,
maxT=getViewport().height-100;
this
.startL=parseInt(
this
.style.left);
this
.startT=parseInt(
this
.style.top);
//alert(e.clientX)
this
.startX=e.clientX;
this
.startY=e.clientY;
//alert(maxL+':'+maxT+':'+L+':'+T)
doc.onmousemove=
function
(e){
posXY(e,0,0,maxL,maxT);
};
doc.onmouseup=
function
(){
doc.onmousemove=
null
;
doc.onmouseup=
null
;
};
return
false
;
}
function
posXY(e,minL,minT,maxL,maxT){
var
e=e||window.event;
var
x=box.startL-(box.startX-e.clientX);
var
y=box.startT-(box.startY-e.clientY);
box.style.left=compareNum(x,minL,maxL)+
'px'
box.style.top=compareNum(y,minT,maxT)+
'px'
}
</script>
</body>
</html>
|
。
。
最后此篇关于支持IE,firefxo,chrome浏览器下鼠标拖动和拖拽的鼠标指针特效的文章就讲到这里了,如果你想了解更多关于支持IE,firefxo,chrome浏览器下鼠标拖动和拖拽的鼠标指针特效的内容请搜索CFSDN的文章或继续浏览相关文章,希望大家以后支持我的博客! 。
我们如何才能使 div 从这里移动到那里。我尝试使用 JQuery 拖放和可排序之类的东西,但我的要求没有得到满足。 我的页面上有很多 DIV,我需要将 DIV_1 拖放到 DIV_2 上,然后应该调
简单表格排序 可以双击编辑 自定义编辑后的 规则 可拖动列进行列替换 可推动边框进行列宽度的缩放 复制代码 代码如下: &n
我有一个元素,我想用鼠标移动它。 var troll = document.getElementById('troll'); troll.addEventListener('dragover', (e
我的问题是如何拖放形状,但要克隆可拖动形状,然后将该克隆拖动到可放置形状。 我是 Konva 的新手。在查看文档和示例时,我可以找到如何拖放形状。 我找到了对形状克隆的引用,但我不确定如何执行此操作。
我正在寻找一个 Java UI 设计器,允许我以 float 模式将控件直接拖放到设计表面(没有 SWT 附带的南北等麻烦)。有没有这样的工具? 另外,我只对提供试用版的工具感兴趣。 编辑:我只对允许
@ 目录 Excel上传和图片视频上传 Excel上传 页面中的使用 图片和视频
当放置/放置元素(通过从一个 DIV 拖动到另一个 DIV),然后删除放置的 DIV 中的一个元素时,其中一些元素会更改位置。 这是一个测试场景:http://jsfiddle.net/TcYHW/8
我正在努力做到这一点,以便用户可以将图标从 Web 浏览器拖到他们的桌面,然后创建一个文本文件。我已经了解了内容部分,但我不知道如何设置文件名。我试过改变 dataTransfer.files 但那是
我有一个类似于下面的代码: var dragme = d3.drag() .on("start", function (d) { var variable
前言: 今天一早起床,就一直太阳穴疼,吃了四片去痛片已经无效,真的是疼的直恶心。 如果说学习或者写文章,能够缓解头疼的话,那我想说,我还能坚持一会..... 很久没更新这系列的文章
我是一名优秀的程序员,十分优秀!