2015-11-05 52 views
0

我正在使用引導Bootstrap(half)xs col's?

我知道xs col's是引導程序中的最小尺寸,但如果我需要一個突破點ex 400px,那麼我希望在那一點上有其他的東西!我怎麼做?

+0

您可以編寫媒體查詢同樣喜歡@media(最大寬度:400像素){ .COL-XS-4 {// 寫自己的CSS }} –

+0

@MandeepSingh但是,這將覆蓋每個col-xs-4類! – Jobter

+0

只有當像素小於400像素時纔會覆蓋,這就是您所需要的,當尺寸小於400像素時編寫自定義代碼 –

回答

0

總結回答:

您可以編寫媒體查詢同樣喜歡

@media (max-width: 400px) { .col-xs-4{ //Write your own css } } 

它只會覆蓋在你的像素是小於400像素,這是你需要什麼,寫你的當尺寸小於400px時自定義代碼

0

在使用引導時編寫正常的html和css。並添加額外的媒體查詢一些自定義列。

@media (min-width: 400px) and (max-width: 768px) { 
 
    .row .col-xss-6 { 
 
    width: 50%; 
 
    } 
 
} 
 
/*for demo */ 
 

 
[class*="col-"] { 
 
    border: 1px solid #f00; 
 
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" /> 
 
<div class="container-fluid"> 
 
    <div class="row"> 
 
    <div class="col-xs-12 col-xss-6"> 
 
     on lowest width, it would be 100% while on other it would be 50% upto 768px .col-xss-6 will overwrite the default width property, but will take float:left, padding-left:15px;padding-right:15px and other imp. properties from col-xs-12 itself. */ 
 

 
    </div> 
 
    </div> 
 
    <div class="row"> 
 
    <div class="col-xs-12"> 
 
     this is without col-xss-6, so it will have default bootstrap properties. 
 
    </div> 
 
    </div> 
 
</div>