CSS Flex无法在iphone 5上运行

时间:2018-02-17 11:05:16

标签: ios css flexbox

我有以下css,并且除了flexy内容的flex设置之外,所有内容都正确显示,并不是在整个屏幕上均匀地间隔项目?

    @media only screen and (max-device-width: 568px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait) {

.container {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    -webkit-box-pack: space-evenly;
        -ms-flex-pack: space-evenly;
            justify-content: space-evenly;
    -webkit-justify-content: space-evenly;
}

h1 {
    font-size: 1.6em;
    color: red;
    margin: 0 auto;
    padding: 3% 0;
}

h2 {
    width: 80%;
    font-size: 1.4em;
    margin: 0 auto;

}

.logo {
    height: 30%;


 }


.text {
}

.icons {
    display: flex;
    justify-content: space-between;
    width: 50%;
    height: 50px;
    margin: 0 auto;
    padding-top: 0;
}

.icon1 {
    width: 25%;
}

.icon2 {
width: 25%;
}

.icon3 {
    display: none;
}

.icon3m {
    display: block;
    width: 25%;
    height: 100%;
    background-image: url('images/insta small.png');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
}

.icon3m a {
    display: block;
    width: 100%;
    height: 100%;

}

.textbreak {
    display: block;
}

}

无法弄清楚为什么它无法正常工作,因为它正确加载,甚至将h1颜色值更改为红色以查看css是否正常工作且

0 个答案:

没有答案