부트스크랩을 사용하면 간단하게 반응형 웹을 만들수 있다.

3 줄이면 모바일에서도 사용할 수 있는 반응형 웹이 만들어진다.

 

 

1) head에 선언하기 - 2줄

<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

 

<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">

 

 

2) body에 div class="container"를 만들고, div 영역 안에서 모든 html을 작성.

<div class="container">

    ...

</div>

 

 

사용예>

<html>

<head>

    <!-- Required meta tags -->

    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!-- Bootstrap CSS -->

    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">

</head>

<body>

    <div class="container">

        간단한 반응형 웹

    </div>

</body>

</html>

 

 

출처>

부트스트랩 공식 문서

https://getbootstrap.com/docs/4.5/getting-started/introduction/

 

'Framework' 카테고리의 다른 글

[Bootstrap] 컴포넌트(Components) - 버튼(Buttons) 옵션  (0) 2020.03.06
[APEX] Oracle Application Express  (0) 2014.12.22

+ Recent posts