$('.step li').mouseenter(function(event) { // var url = $(this).find("a").eq(1).text(); // console.log($('.step li').index()) var X = this.getBoundingClientRect().left; var Y = this.getBoundingClientRect().top; //获取元素座标
这里获取的是.step下面的li 的位置
$('.step li').mouseenter(function(event) { // var url = $(this).find("a").eq(1).text(); // console.log($('.step li').index()) var X = this.getBoundingClientRect().left; var Y = this.getBoundingClientRect().top; //获取元素座标
这里获取的是.step下面的li 的位置
转载于:https://my.oschina.net/u/3669210/blog/1594056