V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
BUappend
V2EX  ›  问与答

nth-child 遇到的问题。。。

  •  
  •   BUappend · 2020-03-10 04:28:11 +08:00 · 962 次点击
    这是一个创建于 1507 天前的主题,其中的信息可能已经有所发展或是发生改变。
    <meta charset="UTF-8"> <meta content="width=device-width, initial-scale=1.0" name="viewport"> <title>Document</title> <style> .box1{ height: 500px; width: 500px; background-color: antiquewhite; display: flex; } .box1-1{ height: 100%; flex:3; } .box1-2{ height: 100%; flex:3; } .box1-3{ height: 100%; flex:4; } .box1 :nth-child(1){ background-color: blueviolet; } .box1 :nth-child(2){ width: 50px; height: 50px; } </style>

    为啥 box5 会有 width:50px height:50px ????

    2 条回复    2020-03-10 08:34:12 +08:00
    BUappend
        1
    BUappend  
    OP
       2020-03-10 04:28:50 +08:00
    怎么都一行了,,,,
    pianjiao
        2
    pianjiao  
       2020-03-10 08:34:12 +08:00 via Android
    换成 2n 看看
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3388 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 12:26 · PVG 20:26 · LAX 05:26 · JFK 08:26
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.