jquery鼠标拖拽,拖到指定位置,触发事件?求源码

做一个圆形菜单效果,拖1234按钮到中间处,alert一下就可以,谢谢... 做一个圆形菜单效果,拖1234按钮到中间处,alert一下就可以,谢谢 展开
 我来答
匿名用户
推荐于2017-09-28
展开全部
<!DOCTYPE HTML>
<html>
<head>
<meta charset=UTF-8>
<title>YuGiOh</title>
<style type="text/css">
* {
margin: 0;
padding: 0;
outline: 0;
vertical-align: baseline;
}

body {
background-color: #7E0000;
}

div {
margin: auto;
border-radius: 360px;
}

.out {
background-color: orange;
width: 300px;
height: 300px;
}

.in {
position: relative;
background-color: pink;
width: 50px;
height: 50px;
top: 125px;
}

.btn {
position: relative;
color: white;
text-shadow: 0px 0px 1px rgb(204, 204, 204);
font: 40px 微软雅黑;
border: 1px solid yellow;
width: 40px;
height: 40px;
line-height: 40px;
text-align: center;
cursor: pointer;
}

.btn.a {
left: -128px;
}

.btn.b {
left: 123px;
top: -57px;
}

.btn.c {
left: 124px;
top: 53px;
}

.btn.d {
left: -130px;
}
</style>
<script type="text/javascript" src="jquery-1.8.0.min.js"></script>
<script type="text/javascript">
var doc = $ (document).ready (function ()
    {

    })[0];
    doc.ondragstart = doc.onselectstart = doc.oncontextmenu = function ()
    {
    return false;
    }
</script>
</head>
<body>
<div class="out">
<div class="in"></div>
<div class="btn a">1</div>
<div class="btn b">2</div>
<div class="btn c">3</div>
<div class="btn d">4</div>
</div>
</body>
</html>
本回答被提问者和网友采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 1条折叠回答
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式