0

私を助けてください。

スクローラーを使用してdiv内にある画像の上に長方形を描画できるようにする必要があります。

IE 9またはFirefoxでは、マウスが長方形の領域に当たったときに、mousemoveイベントの画像への送信を停止します。

divが画像の上にある場合でも、mousemoveイベントを機能させるにはどうすればよいですか?

$("#AnImage")
.mousedown(function(event)
{
//Set the start point and create the new div as a marker. Start the creating process.
})
.mousemove(function(event)
{
//Moves according to the initial point, set the with and height of the marker
})
.mouseup(function(event){
//Stop the creating process. A new Rectangle is over the image.
});

ありがとう。

4

1 に答える 1

1

CSSプロパティを使用できます-画像の上に描画したいpointer-eventsアイテムが内部にない場合。<div>

#AnImage {
  pointer-events: none;
}

プロパティの詳細:ここここ、およびここ

于 2011-11-28T07:52:25.620 に答える