Differences between container, row and span in Bootstrap

后端 未结 3 1804
醉酒成梦
醉酒成梦 2020-12-13 06:18

While using Twitter Bootstrap, should I nest a row div within a container div and put all my span divs within the nested row? Is that the best practice?

What if I pu

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-13 07:07

    A row is designed to go inside of a container. A span is designed to go inside of a row.

    Rendering could get unpredictable if you go with any other combination besides container > row > span .

    Ultimately if your code works, then you're doing okay. There is no reason to get locked into what other people have done. BUT if you change it up, make sure it's for a good reason, and that you comment the code everywhere to explain your thought process.

提交回复
热议问题