Bootstrap grid for printing

前端 未结 11 2243
长情又很酷
长情又很酷 2020-12-23 11:25

I would like to design a report page with a different layout for printing to mobile. I am using bootstrap v3. It seems the grid can\'t differentiate between the two as the b

11条回答
  •  鱼传尺愫
    2020-12-23 11:55

    And the SASS version of Ehsan Abidi's answer using MiCc83's answer:

      @for $i from 1 through 12 {
          .col-sm-#{$i} {
              width: #{percentage(round($i*8.33)/100)};
              float: left;
          }
      }
    

    I prefer this because I always spec the "sm" size and that most closely approximates a print page in my applications. Then I only need to add something specifically for print when I've got an outlier condition.

提交回复
热议问题