FlowerBombs

grid.html 본문

Javascript & JQuery&Ajax/bootstrap

grid.html

CitronLemon 2019. 2. 22. 10:20

Grid => 격자


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
    <style>
       
        .item {
            border: 5px solid #3071A9;
            padding: 10px;
            background-color: #ccc;
        }
    </style>
</head>
 
<body>
    <div class="container">
        <h2>4:8</h2>
 
        <!-- 그리드의 전체 영역을 지정하기 위한 박스 -->
        <div class="row">
            <!--
                그리드의 각 칸을 구성하는 박스
                col-xx-00
                    ww : xs(핸드폰), sm(태블릿), md(노트북), lg(데스크탑)
                    00 : 1~12
                숫자값의 합이 12가 되면 한 줄을 구성.
                * 그리드를 구성하는 박스는 영역을 나누는 역할만 할 뿐 디자인에 관여하지 않는다.
                그러므로 그리드 관련 클래스를 지정한 박스에는 
                width, height, padding, margin, border를 부여해서는 안된다.(다 깨짐)
                * 해당 속성이 필요한 경우 자식 div를 추가해서 적용한다.
                * 지정된 해상도보다 클 경우는 원래 상태 유지.
                * 지정된 해상도보다 작은 경우는 넓이 100%로 변함.
             -->
            <div class="col-md-4">
                <div class="item">left</div>
            </div>
            <div class="col-md-8">
                <div class="item">right</div>
            </div>
        </div>
    </div>
    
    <div class="container">
        <div class="page-header">
            <h2>데스크탑, 모바일: 8:4, 태블릿: 6:6, 핸드폰: 100%</h2>
        </div>
 
        <div class="row">
            <div class="col-md-8 col-sm-6">
                <div class="item">left</div>
            </div>
            <div class="col-md-4 col-sm-6">
                <div class="item">right</div>
            </div>
        </div>
    </div>
 
    <script src="../plugins/ajax-form/jquery.form.min.js"></script>
 
    <!-- https://getbootstrap.com/docs/3.4/getting-started/ Bootsstrap CDN에서 가져오기 -->
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
</body>
cs




'Javascript & JQuery&Ajax > bootstrap' 카테고리의 다른 글

grid5.html  (0) 2019.02.22
inner grid 3  (0) 2019.02.22
gird2  (0) 2019.02.22
float.html  (0) 2019.02.22
image.html  (0) 2019.02.21
Comments