问题现象:图片在拖动上面图标时,会被选择而变蓝
问题现象2:图片可以拖拽
解决方案: 1.禁止图片选中: document.onmousemove = function (ev) { window.getSelection ? window.getSelection().removeAllRanges() : document.selection.empty(); } 2.禁止拖拽: <img src="#" draggable="false">
完成效果:
问题现象:图片在拖动上面图标时,会被选择而变蓝
问题现象2:图片可以拖拽
解决方案: 1.禁止图片选中: document.onmousemove = function (ev) { window.getSelection ? window.getSelection().removeAllRanges() : document.selection.empty(); } 2.禁止拖拽: <img src="#" draggable="false">
完成效果: