// 选点
            $(".e-up-img").click(function (e) {
                that.xx = e.originalEvent.x || e.originalEvent.layerX || 0;//屏幕x坐标
                that.yy = e.originalEvent.y || e.originalEvent.layerY || 0;//屏幕y坐标

                var img_w = $(this).width();
                var img_h = $(this).height();
                var img_left = $(this).offset().left - $(document).scrollLeft();
                var img_top = $(this).offset().top - $(document).scrollTop();
                that.img_x = ((that.xx - img_left) / img_w) * 100 + '%';
                that.img_y = ((that.yy - img_top) / img_h) * 100 + '%';

            });

 

相关文章:

  • 2021-08-13
  • 2021-12-03
  • 2021-04-28
  • 2021-07-14
  • 2021-12-17
  • 2021-08-29
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-05-14
  • 2021-05-30
  • 2022-01-20
  • 2022-12-23
  • 2021-06-24
相关资源
相似解决方案