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

微信小程序图片布局问题 #4

Open
0JARVIS0 opened this issue Feb 28, 2019 · 1 comment
Open

微信小程序图片布局问题 #4

0JARVIS0 opened this issue Feb 28, 2019 · 1 comment

Comments

@0JARVIS0
Copy link

0JARVIS0 commented Feb 28, 2019

微信小程序图片在同一父标签下重叠排布的时候会产生问题,具体表现为无论如何设定z-index,悬浮在上的图片一直会被沉在下方的图片遮盖。这个问题仅仅反映在iOS上,在模拟器和Android上都没有问题。
在真机调试中发现,是小程序图标自带的overflow: hidden;产生了影响,在取消该属性后就正常显示了,但是替换为overflow: visble;等方式未起作用。解决办法有两种:
1.使用cover-image代替上浮图片的image标签,这样在ios和android上都显示正常,但是在模拟器上似乎有些问题。
2.使用一个view包裹上浮的图片。这样在三端表现一致且能解决上述问题。
3.在上方悬浮图片的css中添加overflow: visble;

@0JARVIS0
Copy link
Author

ps:在web端也不存在这样的问题

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

1 participant