Bootstrap-Responsive

임재헌·2023년 4월 3일
0

Bootstrap

목록 보기
10/11
<!DOCTYPE html>
<html lang="en">
<head>
  <title>Responsive </title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.3/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
  <style>
    .b {border: solid 2px orange;}
  </style>
</head>
<body>
<!--
      ● responsive util 
		  - visible-mode mode일때 보이기
		  - hidden-mode  mode일때 숨기기
		  - offset       빈여백으로  
 -->

 Visible-md: md모드일때 보이기
 <!-- 992이상에서만 노출 -->
 <div class="container-fluid">
    <div class="row">
        <div class="col-md-3 b">JAVA</div>
        <div class="col-md-6 b visible-md">CSS</div>
        <div class="col-md-3 b">HTML</div>
    </div>
 </div>

hidden-mode: md모드일때 숨기기
 <div class="container-fluid">
    <div class="row hidden-md">
        <div class="col-md-3 b">JAVA</div>
        <div class="col-md-6 b">CSS</div>
        <div class="col-md-3 b">HTML</div>
    </div>
 </div>

Offset: 빈 여백으로 남김
<div class="container-fluid">
    <div class="row">
        <div class="col-md-4 col-md-offset-4 b">JAVA</div>
        <!--    <div class="col-md-4 offset-col-md--4 b">JAVA</div>
                  -->
        <div class="col-md-4 b">CSS</div>
    </div>
 </div>

 row안에 row 가능 
<div class="container-fluid">
    <div class="row">
        <div class="col-md-3 b">KO</div>
        <div class="col-md-6 b">
            <div class="row">
                <div class=" col-md-4 b">HTML</div>
                <div class=" col-md-4 b">CSS</div>
                <div class=" col-md-4 b">JAVA</div>
            </div>
        </div>
        <div class="col-md-3 b">CH</div>
    </div>
</div>

</body>
</html>

0개의 댓글