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

2025-03-23 04:53:02
推荐回答(1个)
回答1:





YuGiOh

* {
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;
}



var doc = $ (document).ready (function ()
    {

    })[0];
    doc.ondragstart = doc.onselectstart = doc.oncontextmenu = function ()
    {
    return false;
    }





1

2

3

4



相关问答
最新问答