English 中文(简体)
SVG 部分没有在操作中接收活动,而IE
原标题:SVG element not receiving events in Opera and IE

我有一个网页,上面有特别志愿人员组织的内容,应当加以编排。

绘画在浏览器上是正确的。 但是,在接收事件时,国际管理小组实际上似乎阻止了事件/收到事件(它本身没有附加任何事件,因此没有被明确阻止)。

Example:
http://jsfiddle.net/UvRVX/12/ (fixed markup, added circle) FF, Chrome: "svg received mousedown" (correct)
Opera, IE9: -nothing- (incorrect)

当图像通过社区服务局的可见度或显示被掩盖时:无,就会开始工作,但不能使用这种方式。

How to place SVG element above IMG element so it can receive events? (in Opera, IE9)
Thank you

最佳回答

造成这种情况的原因有两个:

1. The svg is empty.
Even though you gave it a height and width, I believe that some browsers don t assign it a real size until you actuall add a shape to it. You can get around this by placing an empty rect there:

<rect x=“0” y=“0” width=“300” stroke=“black” stroke-width=“0”=1'none”></rect>

2. 结 论 由于<代码>点名-events 财产。 http://www.w3.org/TR/SVG/interact.html#PointerEventsProperty"rel=“noretinger” here。 违约时,它的价值是<条码>可见的<>条码>,因此,我确实不知道为什么 Chrome和FF允许这些事件发生。 页: 1

另外,在html时也小心谨慎,但受到严重打击。

Fix:

rel=“noretinger”>http://jsfiddle.net/mihaifm/ptLrB/2/

问题回答

操作和IE9实际上是正确的,因为圈子的填料被定在<代码>none上。 当你点击中风时,所有浏览器都显示警报。 由于圈子的填满是透明的,圈子内部的点击打了图像。

在圈子中添加<条码>点-秒=“可见”,以忽视圈子的补足价值。

Sample Code / JSFiddle

http://www.w3.org/TR/SVG/interact.html# PointerEventsProperty" rel=“nofollow noreferer” SVG spec for pointer-events:

<>可见>

当“看望”财产被划为可见物,点子要么位于内地(即填满)或该元素的外围(即中风)时,该元件可以是点人活动的目标要素。 “填埋”和“中风”的数值不影响事件处理。

Interest。 Non-html-elements (here:<svg>)在涉及z-index cs Value时似乎不正确。

为解决这一问题,我仅以另一个四点包装:。 http://jsfiddle.net/UvRVX/6/

然而,如果你在座中选取一些内容的话,这些内容将正确展示,并收到以下活动:。 (红广场的浮标引起警惕,但周围没有。)





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签