Bootstrap 3: Missing gutters

后端 未结 2 497
耶瑟儿~
耶瑟儿~ 2020-12-08 09:42

Just started playing around with bootstrap 3 and I can\'t get gutters between columns to work.

I created the most basic code to test with:



        
2条回答
  •  一个人的身影
    2020-12-08 10:32

    Bootstrap 3 switched to using padding for the gutters rather than margins. So, the content is parted, but the boxes aren't. And a background-color will fill the padding as well.

    Though, you should be able to get the desired effect by setting the background on inner boxes:

    Test

    Test2

    http://jsfiddle.net/PFxUk/


    Though, the goal is just to apply the background to a single, wrapping child. So, if the headers definitely won't have any siblings, then you can possibly forgo the additional

    s:

    Test

    Test2

    http://jsfiddle.net/G2gbG/

提交回复
热议问题