BUappend
V2EX  ›  问与答

nth-child 遇到的问题。。。

  •  
  •   BUappend · Mar 10, 2020 · 1985 views
    This topic created in 2450 days ago, the information mentioned may be changed or developed.
    <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 replies  •  2020-03-10 08:34:12 +08:00
    BUappend
    BUappend
    OP
    Mar 10, 2020
    1
    怎么都一行了,,,,
    pianjiao
    pianjiao
    Mar 10, 2020 via Android
    2
    换成 2n 看看
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   916 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 235ms · UTC 21:23 · PVG 05:23 · LAX 13:23 · JFK 16:23
    ♥ Do have faith in what you're doing.