티스토리 뷰
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>로그인 페이지</title>
<!-- 구글웹폰트-->
<link href="https://fonts.googleapis.com/css2?family=Black+Han+Sans&display=swap" rel="stylesheet">
<style>
* {
font-family: 'Black Han Sans', sans-serif;
}
.mytitle {
background-color: green;
width: 300px;
height: 200px;
color: white;
text-align: center; /*가운데 정렬*/
background-image: url("https://www.ancient-origins.net/sites/default/files/field/image/Agesilaus-II-cover.jpg");
background-size: cover;
background-position: center;
border-radius: 10px;
padding-top: 40px; /*padding은 안쪽 여백*/
}
.mybtn {
width: 100px;
margin-left: 100px;
}
.wrap {
background-color: darkgray;
width: 300px;
height: 420px;
border-radius: 10px;
margin: auto; /*margin은 바깥쪽 여백*/
}
.myidpw {
width: 200px;
margin: auto;
}
</style>
</head>
<body>
<div class = "wrap">
<div class = "mytitle">
<h1> 로그인 페이지 </h1>
<h5> 아이디, 비밀번호를 입력해주세요</h5>
</div>
<div class = "myidpw">
<p> ID :  <input type = "text"/> </p> <!-- ' ' 공백 한칸을 의미 -->
<p> PW : <input type = "text"/> </p>
</div>
<button class = "mybtn"> 로그인하기 </button>
</div>
</body>
</html>
저번 시간에 만든 로그인 페이지에서 css를 이용하여 몇 가지 꾸미기를 해보았다.
사용한 기능으로는 구글 웹폰트 적용, 이미지 삽입(image, size, position 문장은 같이 쓴다.) , 여백 조절 방법(magin: 바깥쪽 여백, padding: 안쪽 여백)
세세한 작업은 코드 주석 참고.
REVIEW
강의 내용대로 따라 해 보았지만 막상 처음부터 시작하려 했을 때 많은 시간을 버벅거리게 되었다.
많은 경험을 해보고 숙달해보는 것이 많은 도움이 될 것이라고 생각되는 시간이었다.
'[학습일지] > Python' 카테고리의 다른 글
[학습일지] 웹개발 2-1 ~ 2-5 (JQuery, show, hide, temp_html) (0) | 2022.07.04 |
---|---|
[학습일지] 웹개발 (방명록 만들어보기) (0) | 2022.07.01 |
[학습일지] 웹개발 1-14 ~ 1-20 (javascript 기초) (0) | 2022.07.01 |
[학습일지] 웹개발 1-13 (별점 탭 만들기) (0) | 2022.06.30 |
[학습일지] 웹개발 1-9 ~ 1-12 (0) | 2022.06.28 |