BUappend
V2EX  ›  问与答

nth-child 遇到的问题。。。

  •  
  •   BUappend · Mar 10, 2020 · 1563 views
    This topic created in 2267 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
        1
    BUappend  
    OP
       Mar 10, 2020
    怎么都一行了,,,,
    pianjiao
        2
    pianjiao  
       Mar 10, 2020 via Android
    换成 2n 看看
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   881 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 22:22 · PVG 06:22 · LAX 15:22 · JFK 18:22
    ♥ Do have faith in what you're doing.