- 수업목표
- 서버-클라이언트 역할 이해
- HTML. CSS 기초지식 이해, 부트스트랩 사용
- Javascript 기초 문법 사용
01~03. HTML, CSS 기본 개념
- 네이버 웹페이지의 글을 수정했다. 웹서비스의 동작원리가 뭘까?
- 힌트1: 내 컴퓨터에서만 수정된다. 원리가 뭘까?
- 힌트2: 내가 보고 있는 웹페이지는 사실, 인터넷과 관련이 없다.
- 힌트3: 새로고침하면 원상복귀된다.
- 왜? 서버로 부터 새로 정보를 받아오기 때문이다.
- 브라우저의 역할: 서버에 요청한다 -> 받아와서 그려준다.
- html: 뼈대
- css: 꾸미는 것(예: 컬러, 폰트사이즈 등을 지정하는 것)
- js: 클릭하면 이동하는 것, 움직이는 것 등
- 영화예매사이트에서 새로고침하지 않아도, 좌석이 실시간으로 보이는 것?
- 예쁘게 그리지않고, 데이터만 주고받는 형태의 예시이다.
- "JSON 형식" 이라고 부른다.
04. 로그인페이지 만들기
- HTML
- 메타태그, 타이틀 태그 등 태그로 이루어져 있다.
- 로그인페이지 보고 만들어보기
<h1>로그인 페이지</h1>
<p>ID: <input type="text" /></p>
<p>PW: <input type="text" /></p>
<button>로그인하기</button>
05. CSS 기초
- 제목에 색 입히기
<head>
<meta charset="UTF-8">
<title>로그인 페이지</title>
<style>
.mytitle{
color:red;
}
</style>
</head>
<body>
<h1 class="mytitle">로그인 페이지</h1>
06.자주 쓰이는 CSS
- 배경에 내가 원하는 이미지를 지정하기
- 이미지 url, position, size는 항상 같이 간다. 기억하기!
.mytitle{
background-image: url('https://www.ancient-origins.net/sites/default/files/field/image/Agesilaus-II-cover.jpg');
background-position: center;
background-size: cover;
}
- 버튼속성을 가운데에 배치하려면, block으로 표시해야함
.mybtn{
width: 100px;
margin:30px auto;
display: block;
}
07.폰트, 주석, 파일분리
- 폰트사이트: 구글웹폰트
- 주석처리: 커맨드 + /
- 스타일부분 파일분리: style.css
08~09.부트스트랩 기초
- 사이트: https://getbootstrap.com/docs/4.0/components/alerts/
- 여기서 골라서 코드붙여넣기하면 가넝한.
- 헤드에 필요한 정보 넣어주기
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"
integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q"
crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"
integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl"
crossorigin="anonymous"></script>
- 부트스트랩에서 Jumbotron, cards 검색하여 복사, 붙여넣기
- src에 원하는 (고양이)사진 넣고
- div.wrap으로 감싸서
- margin: auto; 넣어주면 가운데 정렬할 수 있다.
고양이 사진 주소(너무길어서 ㅋㅋㅋㅋㅋ ㅠㅠ)
src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAoHCBUVEhgVFRUYGBgZGBwZGBoYGhgYGBgYGBgaGRgYGBgcIS4lHB4sIRgZJjgmKy8xNTU1GiQ7QDs0Py40NTEBDAwMEA8QHhISHDQjIyU0NDQ0NDE0NDQ0MTE0NDQ0NDQ0MTQ0NDQ0NDQ0NDQ0NDQ0NDQ0MTQxNDQ0NDQ0MTQ0Mf/AABEIAJ8BPgMBIgACEQEDEQH/xAAcAAABBQEBAQAAAAA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GFv/AJrBuCQI91t/xNmpctZpDAfm7f7BL+HXCratXx3/AA0yC0d3dJ9N0/Fb7eqEQxjY6BJW2MA+0J76fNJ6IqaqMvFY+qvE2sazxDuNPXsF51iNwa9QHcnT66BX3G94S8UgSABOmmqquC8KfVuQS6WM1MxM9Akxbcm3wPDm0aTW9Y19SrRlLWQPmpxswGqqxat4VNxB1IMD03191nHs5TTO8Z4sWwxrhl2gRMqdwJVLqcxAWKfYPuqzQHhupJLpOnoN16jw5gfgMDQQfNdJEW9OfEz3+HmY+MoJIj4tNl5NSL6lU+ZPuvYMasT4L4I+E7rylsBxynaNPOSD9lz7/VzWumnw/DiGT1j6q5sMPzgAugzuqrCL+aTDElxharBKRkduqXGXUbMrN1yxK2DKYAPLHP3hUWJUGVhTa2CA4+wAj9QtXj9sXUXRvCx2D1BOQbj4vM+quzXSJd9tPhtqGMAATqu5USwumva9zZ5QCJ7ZQVObzAFbE5S/rgmru5iTIqS4pQF1ypwYjHIBPATw1KGoP//Z"
10. 부트스트랩에서 가져온 포맷을 변형하기
- 변형해서 링크 메모장 만들기
- 상단 헤더
<div class="jumbotron">
<h1 class="display-4">나홀로 링크 메모장!</h1>
<p class="lead">중요한 링크를 저장해두고, 나중에 볼 수 있는 공간입니다.</p>
<hr class="my-4">
<p class="lead">
<a class="btn btn-primary btn-lg" href="#" role="button">포스팅박스 열기</a>
</p>
</div>
- 고양이 카드로 바꾸기
- 아래 코드를 9줄 복사+붙여넣기
<div class="card">
<img class="card-img-top"
src="..."
alt="Card image cap">
<div class="card-body">
<p><a href="http://naver.com/" class="card-title">여기 기사 제목이 들어가요</a></p>
<p class="card-text">기사의 요약 내용이 들어갑니다. 동해물과 백두산이 어쩌고</p>
<p class="card-comment">여기에 코멘트가 들어갑니다.</p>
</div>
</div>
11. 메모장 사이에 url, 코멘트 입력할 수 있는 포스팅박스 추가하기
<!-- input box -->
<div class="input-box">
<div class="article">
<div>Article URL</div>
<input type="url" class="article-input">
</div>
<div class="comment">
<label for="exampleFormControlTextarea1">Comment</label>
<textarea class="form-control" id="exampleFormControlTextarea1" rows="3"></textarea>
</div>
<button type="submit" class="btn btn-primary">기사 저장</button>
</div>
아직 1주일차를 다 듣진못했는데, 이틀치 각각 8강까지 수강 완.
내일은 JS배울 차례임.
HTML, CSS, JS사용법은 아는데 부트스트랩은 처음 해봐서 신기했다.
이런 편리한 곳이 있다니..ㅜㅜ
'Web Development' 카테고리의 다른 글
[웹개발종합반] 2주차 개발일지 -JS, JQuery, Ajax (0) | 2021.07.24 |
---|---|
[웹개발종합반] 1주차 개발일지 (2). JavaScript 기초 (0) | 2021.07.24 |
[프론트엔드 개발] 유튜브 클론코딩 완성! (feat. 드림코딩 by.엘리) (3) | 2021.07.20 |
국비지원으로 스파르타 코딩클럽의 웹개발 풀스택강의를 듣기 시작했다. (0) | 2021.07.20 |
[JS] JS활용한 투두리스트 웹 사이트 프로젝트-마무리, 보완할 점 (0) | 2021.07.12 |