cevincheung
V2EX  ›  CSS

问个 css 问题,为毛设置了 height,但是盒子的高度没变?

  •  
  •   cevincheung ·
    cevin · Jul 1, 2015 · 3759 views
    This topic created in 4043 days ago, the information mentioned may be changed or developed.


    /* 首页iPhone */
    .iphone.container {
        width:1000px;
        margin:0 auto;
        height:427px;
    }
    .iphone.warp{
        position:relative;
        padding:78px 20px;
        width:960px;
        height:427px;
        float:left;
    }
    .iphone.iphone-bg {
        position:absolute;
        top:78px;
        left:50%;
        margin-left:-106px;
        width:212px;
        height:427px;
        background: url(images/index_bg_iphone.png) no-repeat;
        float:left;
    }
    
    <div class="container hidden-l">
            <div class="iphone container">
                <div class="iphone warp">
                    <div class="iphone iphone-bg fadein">
    
                    </div>
                </div>
            </div>
        </div>
    
    1 replies    2015-07-01 20:04:02 +08:00
    cevincheung
        1
    cevincheung  
    OP
       Jul 1, 2015
    已解决,box-sizing的问题
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3460 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 04:57 · PVG 12:57 · LAX 21:57 · JFK 00:57
    ♥ Do have faith in what you're doing.