Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我的区域形状看起来像这样带有这个 id,那么在 jquery 中解决这个问题的最佳方法是什么。
<area id="five" shape="rect" coords="610,22,653,62" href="#" />
我不认为区域形状应该重要。你可能只是做这样的事情:
var $areaShape = $("#five"), $div = $("<div>Cool Stuff bro.</div>"); $div.css({ position : "absolute", top : $areaShape.offset().top, left : $areaShape.offset().left }); $("body").append($div);