【问题标题】:My icons look fine on desktop and dev-tools, but are smushed once on an iPhone我的图标在桌面和开发工具上看起来不错,但在 iPhone 上被弄脏了一次
【发布时间】: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。

【问题讨论】:

    标签: html ios css reactjs


    【解决方案1】:

    找到它,我的身高:100%,我绝对应该有一个固定的数量。修复了我的问题!

    对于以后阅读本文的任何人,请确保您有专门针对手机尺寸的媒体查询。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-01-15
      • 2016-08-10
      • 2015-05-09
      • 1970-01-01
      • 1970-01-01
      • 2012-11-25
      • 1970-01-01
      • 2010-10-11
      相关资源
      最近更新 更多