2017-09-21 9 views
1

시맨틱 UI를 사용하여 모바일 장치와 다른 장치를 어떻게 다르게 설정할 수 있습니까? 모바일을 제외한 모든 기기에서 Label을 오른쪽으로 정렬하고 싶습니다. 이것이 가능한가? 아니면 해결 방법이 있습니까?시맨틱 UI : 서로 다른 장치의 문자 정렬이 달라집니다.

<table> 
    <tr> 
     <td class="right aligned tablet computer only">Label</td> 
     <td>Value</td> 
    </tr> 
</table> 

답변

0

변형 된 표와 표를 사용할 수 있습니다. 그리드에서 모바일, 태블릿 또는 컴퓨터에 표시 될 행을 정의합니다. 각 장치 행은 특정 정렬이있는 테이블을 포함합니다.

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> 
 
<script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.13/semantic.js"></script> 
 
<link href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.13/semantic.css" rel="stylesheet"/> 
 

 
<div class="ui container"> 
 
    <div class="ui one column grid"> 
 

 
     <div class="mobile only row"> 
 
     <table class="ui celled table"> 
 
      <tbody> 
 
      <tr class="right aligned"> 
 
       <td>Mobile</td> 
 
       <td>Value mobile</td> 
 
       </tr> 
 
       </tbody> 
 
      </table> 
 
     </div> 
 

 
     <div class="computer only row"> 
 
      <table class="ui celled table"> 
 
      <tbody> 
 
       <tr class="left aligned"> 
 
       <td>Computer</td> 
 
       <td>Value on computer</td> 
 
       </tr> 
 
      </tbody> 
 
      </table> 
 
     </div> 
 
</div> 
 
</div>