2017-10-24 2 views
0

두 개의 12 열 섹션이 있습니다. 모바일 디자인에서 섹션을 변경하고 싶습니다.부트 스트랩 12 열

예 : 코드

< section class="col-xs-12" > 
mobile top/desktop bottom 
</ section > 
< section class="col-xs-12" > 
mobile bottom/desktop top 
</ section > 

누구나 변경 방법을 알고 있습니다.

+1

어쩌면 [CSS로 떠 된 div의 순서 변경]의 중복 (https://stackoverflow.com/q/25710215/5393271) – sTx

+0

는 복제 할 수 없습니다에있다 float로 시도하십시오 – Lasantha

답변

0

미디어 쿼리와 float 속성을 사용해보십시오.

기본적으로 데스크톱 모드에서 작동하는 열 위치를 전환합니다. 화면이 모바일 인 경우 (부트 스트랩 < = 480px에 따라) 상단 col 플로트를 오른쪽으로 둡니다. 아래쪽으로 위치가 전환됩니다.

<div class="col-xs-12 myCol"> 
mobile bottom/desktop top 
</div> 
<div class="col-xs-12"> 
mobile top/desktop bottom 
</div> 

CSS :

.myCol { 
    float:right 
} 
@media screen and (min-width: 480px){ 
    .myCol{ 
    float:none 
    } 
} 
+0

ur 도움에 감사드립니다. 다음 링크 helped me, https://stackoverflow.com/questions/25710215/change-order-of-floated-divs-with-css – Lasantha