V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
miaobug
V2EX  ›  CSS

询问一个 css 问题,为啥改变上下的 margin 会影响左右的显示

  •  
  •   miaobug · Jul 28, 2016 · 3230 views
    This topic created in 3572 days ago, the information mentioned may be changed or developed.

    http://codepen.io/design8383/pen/EFAzo

    将 css 第七行 label { margin: 1.5em auto } 改为 label { margin: 1.0em auto } 后

    为何三组东西堆在了一起

    另外请问一下大家,自学前端有没有什么好的练习资源(with solutions)?感觉还不会熟练的用 css 生成自己想要的效果,或者实现的很丑陋,或者人家代码的意思都看不懂。

    2 replies    2016-07-30 21:30:53 +08:00
    dong3580
        1
    dong3580  
       Jul 28, 2016
    你需要了解: margin-top,margin-right,margin-bottom,margin-left
    miaobug
        2
    miaobug  
    OP
       Jul 30, 2016
    @dong3580 margin: 1.0em auto 不是缩写形式吗? 1.0 指上下 margin , auto 指左右。请问跟问题的关系是?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3461 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 10:41 · PVG 18:41 · LAX 03:41 · JFK 06:41
    ♥ Do have faith in what you're doing.