以下是我的代码:
<html>
<head>
<title>image pan test</title>
</head>
<body>
<div id="container" style="position: absolute; left: 420px; top: 10px; width: 500px; height: 500px; overflow: hidden; margin: 0; padding: 0; border: solid 1px gray">
<img id="img" style="border: 0px none ; margin: 0px; padding: 0px; position: absolute; left: 0px; top: 0px; width: 256px; height: 256px; -moz-user-select: none; -moz-user-focus: ignore;" src="image/Arsenal Fans Association.jpg"/>
</div>
</body>
</html>
在firefox下,鼠标拖拽div时我不想让图片被选择上,因此我使用 -moz-user-select: none; -moz-user-focus: ignore;属性,但没有见到什么效果。
先前鼠标放在图片上拖拽时,鼠标变为圆圈叉状态,现在效果还是这样的,只是用ctrl+A无法选中图片了,真是不知道怎么取消页面图片接受鼠标事件,请大家帮帮忙,谢谢!