2016-02-26 37 views
3

我無法弄清楚如何製作像這樣的引導列:在列寬中使用小數進行引導

col-md-4.5 | COL-MD-7.5

+1

好,據瞭解,這是硬編碼12列。但是如果你可以增加到24列,你不需要小數 - 它會是9和15,對嗎?看看這裏http://stackoverflow.com/questions/19253088/customizing-number-of-columns-in-bootstrap-3。我不知道他們是否最終實現了這一點,但是這是一個很好的開始。 –

回答

1

您可以使用媒體查詢

一樣,你可以使用媒體查詢時,屏幕尺寸變化

/* Extra small devices (phones, less than 768px) */ 
/* No media query since this is the default in Bootstrap */ 

/* Small devices (tablets, 768px and up) */ 
@media (min-width: @screen-sm-min) { 
    .your-class1{ 
     width:37.5%; 
    } 
    .your-class2{ 
     width:62.5%; 
    } 
} 


/* Medium devices (desktops, 992px and up) */ 
@media (min-width: @screen-md-min) { ... } 

/* Large devices (large desktops, 1200px and up) */ 
@media (min-width: @screen-lg-min) { ... } 

看到http://getbootstrap.com/css/