Twitter Bootstrap - Position issue with row-fluid

后端 未结 6 1985
借酒劲吻你
借酒劲吻你 2021-02-04 14:56

I\'m currently building a website using Twitter bootstrap (which is amazing!). I had the layout using:

6条回答
  •  误落风尘
    2021-02-04 15:38

    If you know the number of span for each row, you can use an expression like this:

    .row-fluid [class*="span"]:nth-child(3n+1) {
       margin-left: 0;
    }
    

    for example: if you have 3 spans for each row, the above expression will removes margin from the first span of each row. And the below one removes the margin-right for the last element on each row:

    .row-fluid [class*="span"]:nth-child(3n+3) {
        margin-right: 0;
    }
    

提交回复
热议问题