我想与兄弟img做一个拖拽框,'move-obj'可以被拖拽。它在其他浏览器中正确运行,但IE( 8,9,10)。在IE中,只是当你将鼠标悬停在边框可以拖动“移动 - 目标”,但如果去掉标签“IMG”它的工作correctly.I发现,如果我添加背景色为“移动 - 目标”,它也会正确运行,但它不是我想要的。有人能给我一些建议吗?这里是codepen拖动不起作用,当它在IE中有一个兄弟姐妹img
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
.wrap{
position: relative;
width: 100%;
height: 100%;
background-color: #f0f0f0;
padding: 10%;
}
.wrap-inside{
position: relative;
width: 500px;
height: 500px;
border: 1px solid #ddd;
}
.move-obj{
cursor: move;
position: absolute;
width: 100px;
height: 100px;
border: 1px solid blue;
}
.bg{
width: 500px;
height: 500px;
position: absolute;
}
</style>
</head>
<body>
<div class="wrap">
<img class="bg" src="https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcTE2qkLv64zdI4z5uIbE1oSMmI0AiQcbwbhAYAyI0cF2Dwg88tb" alt="">
<div class="wrap-inside">
<div class="move-obj"></div>
</div>
</div>
</body>
</html>
我很抱歉没有照亮问题,我添加了一些代码到代码笔。 Actuall我想拖动'move-obj',但它不适用于IE浏览器。 – yzajoee