【发布时间】:2020-01-19 23:11:10
【问题描述】:
我的页脚图标在 ios 上被垂直涂抹。一旦我旋转手机,它们就很好了,我在浏览器开发工具上检查了纵横比等,它工作正常……只是在垂直视图中的 ios 上不行。同样,当我旋转手机时,它们看起来很好,只是不是垂直的。
知道为什么会这样吗?我假设它在我的一个媒体查询中,我将包括几个可能引起关注的问题。
如果您能提供一些帮助,我将非常感谢您的帮助!
我尝试使用 XCode 开发工具来发现问题,但没有解决任何问题。
// Parent to imgLink
const SocialDiv = styled.div`
height: 100%;
width: 300px;
display: flex;
flex-direction: row;
justify-content: space-evenly;
align-items: center;
align-self: flex-end;
@media only screen and (max-width: 660px) {
width: 250px;
}
@media only screen and (max-width:497px) {
width:100%;
}
`
// Child to Social Div
const imgLink = styled.a`
height: 100%
width: 25%;
display: flex;
justify-content: center;
align-items: center;
margin-top: 0;
margin-bottom: 0;
align-self: center;
@media only screen and (max-width: 525px) {
width: 15%;
margin: -3%;
margin-top: 0;
margin-bottom: 0;
}
@media only screen and (max-width:497px) {
width: 25%;
justify-content: center;
margin: 0;
}
`
// Child to imgLink
const Img = styled.img`
height: 100%;
width: auto;
`
预期的结果是 1x1 的纵横比,现在我的水平大约是 2:1。
【问题讨论】: