基础 - 图像在Ipad / Iphone中留下容器 [英] Foundation - Image leaves container in Ipad/Iphone
本文介绍了基础 - 图像在Ipad / Iphone中留下容器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
图像似乎要离开它们各自的容器,并出现在它下面的文本之上。这只发生在移动设备上。
在桌面上,即使我缩放到500%,也不会发生。
我正在使用块网格工具和正常网格。
解决方案
我找到了问题。 / p>
代码如下:
top:50%;
剩下:50%;
保证金 - 右:-50%;
transform:translate(-50%,-50%);
是整个垂直对齐的一部分。但似乎并没有移动友好。我做了一个媒体查询来修复它。
Images seem to be leaving their respective containers and appearing on top of the text below it. This only happens for mobile devices.
In desktop, even if I zoom to 500%, it won't happen.
I'm using the block-grid tool and the normal grid.
解决方案
I figured out the issue.
Code like the following:
top: 50%;
left: 50%;
margin-right: -50%;
transform: translate(-50%, -50%);
Is part of the whole vertical aligning thing. But doesn't seem mobile friendly at all. I made a media query to fix it.
这篇关于基础 - 图像在Ipad / Iphone中留下容器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文