在Firefox上,同一div看起来较小,而在Chrome上,相同

时间:2019-01-23 13:12:00

标签: css html5 google-chrome firefox styled-components

正如标题所示,正如您在此相册中所看到的,相同的组件在Chrome中看起来更大,在Firefox中看起来更小:https://imgur.com/a/0fvXiZ6 我也不明白为什么身体有不同的大小。 我当然没有弄乱浏览器的缩放功能。 这是body,html和包装此表单每个组件的容器的css:

    const GlobalStyle = createGlobalStyle`
  body,html {
    width: 100%;
    height: 100%;
    margin: 0;
    background: #1D9F76;
  }
`

const Container = styled.div`
    position: absolute;
    width: 400px;
    height: 440px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display:flex;
    flex-direction: column;
    align-items: center;
`

我认为发布其余的html和css是无关紧要的,但如有需要,我会发布它。

0 个答案:

没有答案
相关问题