Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在手机web页面中:top值问题 #7

Open
annylsj opened this issue Jul 6, 2016 · 3 comments
Open

在手机web页面中:top值问题 #7

annylsj opened this issue Jul 6, 2016 · 3 comments

Comments

@annylsj
Copy link

annylsj commented Jul 6, 2016

如果商品很多,页面可以滚动,当商品开始时的top值高度大于屏幕的高度,加入购物车时,top值会比商品在屏幕中显示的位置低,请问如何解决?谢谢

@djfly
Copy link

djfly commented Sep 5, 2016

我也有这个问题,好像是fixed的过,浏览器滚动条滚动后,高度位置就不对了

@djfly
Copy link

djfly commented Sep 5, 2016

改成absolute $element.css({marginTop: '0px', marginLeft: '0px', position: 'absolute'}).appendTo('body');
暂时可以用,不知道会不会有什么问题

@EchoWht
Copy link

EchoWht commented Oct 9, 2016

起点的top值写鼠标距离浏览器的距离就可以了clientY
start: { left: event.pageX, top: event.clientY },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants