鼠标拖拽多次没有反应,但最终都会有拖拽效果(感觉就像 拖拽不灵敏)并且在谷歌浏览器中拖拽没有影子,而火狐有影子。 <style> #dragRegion{ display:block; width:300px; height:100px; margin:100px; background-color:aquamarine;}#drag{ width:100px; height:100px; float:left; background-color:bisque;}</style> <body><box id="dragRegion"></box><p id="drag" darggable="ture" ></p> <script>drag.ondragstart = function () { console.log('1')}drag.ondrag = function(){ console.log('2')}drag.ondragend = function(){ console.log('3')}dragRegion.ondragenter = function(){ console.log('4')}dragRegion.ondragover = function(e){ e.stopPropagation(); e.preventDefault(); console.log('5')}dragRegion.ondragleave = function(){ console.log('6')}dragRegion.ondrop = function(){ console.log('7')} </script>
添加回答
举报
0/150
提交
取消