V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Can I use?
http://caniuse.com/
Less
http://lesscss.org
Cool Libraries
Bootstrap from Twitter
Jetstrap
cevincheung
V2EX  ›  CSS

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

  •  
  •   cevincheung ·
    cevin · 2015-07-01 19:38:41 +08:00 · 3226 次点击
    这是一个创建于 3220 天前的主题,其中的信息可能已经有所发展或是发生改变。


    /* 首页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 条回复    2015-07-01 20:04:02 +08:00
    cevincheung
        1
    cevincheung  
    OP
       2015-07-01 20:04:02 +08:00
    已解决,box-sizing的问题
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   4392 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 10:11 · PVG 18:11 · LAX 03:11 · JFK 06:11
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.