【发布时间】:2015-12-05 04:41:48
【问题描述】:
当鼠标悬停在 big-girl-image 上时,small-edit-image(铅笔图)会出现在 big-girl-image 的上方。然后当鼠标悬停在铅笔图像上时,大女孩图像开始失去焦点,因此铅笔图像消失。我尝试使用onmouseleave=function(),但仍然无法解决这个问题。我尝试使用 css z-index 也无法修复此按钮。在http://jsfiddle.net/zac1987/6o2g0c60/4/ 进行演示。代码:
var searchDl = 1;
var l = 0;
var r = Raphael(5, 5, 1950, 1950);
var p = r.path("M 550, 20 C 720,60 920,480 550,700").attr({stroke: "none"}),
pt = p.getPointAtLength(l);
e = r.image("http://2aek.com/inventory/test/1.png", pt.x, pt.y, 120, 120),
totLen = p.getTotalLength(),
e.node.onmouseover = function(){
y = r.image("http://2aek.com/inventory/test/edit-button.png", pt.x, pt.y, 30, 30);
z = r.image("http://2aek.com/inventory/test/delete-button.png", pt.x + 90, pt.y, 30, 30);
};
e.node.onmouseleave=function(){
y.remove();
z.remove();
alert ("big-girl-image losing focus already!");
};
small-edit-image 位于 big-girl-image 之上。光标在小编辑图片上时,如何让鼠标光标一直聚焦在大女孩图片上?
【问题讨论】:
标签: javascript jquery svg raphael