HTML 반응형 웹 디자인
- 이전 페이지 HTML 레이아웃
- 다음 페이지 HTML 컴퓨터 코드
반응형 웹 디자인이 무엇인가요?
- RWD는 반응형 웹 디자인(Responsive Web Design)을 의미합니다
- RWD는 변할 수 있는 크기로 웹 페이지를 전달할 수 있습니다
- RWD는 태블릿과 모바일 장치에 필요합니다
자신의 반응형 디자인을 만들기
반응형 디자인을 만드는 또 다른 방법은 직접 만드는 것입니다:
!DOCTYPE html <html lang="en-US"> <head> <style> .city { float: left; margin: 5px; padding: 15px; width: 300px; height: 300px; border: 1px solid black; } </style> </head> <body> <h1>CodeW3C.com Demo</h1> <h2>이 반응형 페이지를 크기 조절하세요!</h2> <br> <div class="city"> <h2>London</h2> <p>London is the capital city of England.</p> <p>It is the most populous city in the United Kingdom,</p> with a metropolitan area of over 13 million inhabitants.</p> </div> <div class="city"> <h2>Paris</h2> <p>Paris is the capital and most populous city of France.</p> </div> <div class="city"> <h2>Tokyo</h2> <p>Tokyo is the capital of Japan, the center of the Greater Tokyo Area,</p> and the most populous metropolitan area in the world.</p> </div> </body> </html>
Bootstrap 사용
반응형 디자인을 만드는 또 다른 방법은 이미 준비된 CSS 프레임워크를 사용하는 것입니다。
Bootstrap는 가장 인기 있는 반응형 웹 개발을 위한 HTML, CSS, 및 JS 프레임워크입니다。
Bootstrap는 모든 크기의 디스플레이, 노트북, 태블릿, 모바일 기기에서 외관이 훌륭한 사이트를 개발하는 데 도움을 줍니다:
!DOCTYPE html <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"> </head> <body> <div class="container"> <div class="jumbotron"> <h1>CodeW3C.com Demo</h1> <p>Resize this responsive page!</p> </div> </div> <div class="container"> <div class="row"> <div class="col-md-4"> <h2>London</h2> <p>London is the capital city of England.</p> <p>It is the most populous city in the United Kingdom,</p> with a metropolitan area of over 13 million inhabitants.</p> </div> <div class="col-md-4"> <h2>Paris</h2> <p>Paris is the capital and most populous city of France.</p> </div> <div class="col-md-4"> <h2>Tokyo</h2> <p>Tokyo is the capital of Japan, the center of the Greater Tokyo Area,</p> and the most populous metropolitan area in the world.</p> </div> </div> </div> </body> </html>
Bootstrap에 대한 더 많은 지식을 배우기 위해, 우리의 Bootstrap 강의.
- 이전 페이지 HTML 레이아웃
- 다음 페이지 HTML 컴퓨터 코드