[1주차] google font 사용법

정우진·2022년 6월 11일
0

[구글폰트 사용법 포인트]

  1. 구글 포인트로 접속 후 link 주소를 복사한 후 head 테그 안에서 title 테그 밑에 붙여 준다.
  2. CSS rules to specify families의 주소를 복사하여 style 테그 안에 넣는데, 별{} 안에다가 넣어준다. 별{}의 뜻은 모두 적용한다라는 뜻이다.
  • 아래의 코드에서 음영처리 된 부분을 참고

[코드 보기]

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>로그인페이지</title>
    <link href="https://fonts.googleapis.com/css2?family=Jua&display=swap" rel="stylesheet">
    <style>
        *{
            font-family: 'Jua', 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: 20px;
        }

        .wrap {
            width: 300px;
            margin: auto;
        }

        .mybtn {
            width: 100px;
            margin: auto;
            display: block;
        }

        .red-color {
            color: red;
            font-size: 20px;
        }
    </style>

</head>
<body>
    <div class="wrap">
        <div class="mytitle">
            <h1>로그인 페이지</h1>
            <h5>아이디, 패스워드를 입력해주세요</h5>
        </div>

        <p>ID: <input type="text"/></p>
        <p>pw: <input type="text"/></p>
        <button class="mybtn red-color">로그인하기</button>
    </div>

</body>
</html>
profile
야하마 군산악기사 운영자

0개의 댓글