CSS) 글꼴관련스타일

서지은·2024년 9월 2일

CSS 기본문법

목록 보기
4/8
post-thumbnail

웹폰트 제공 사이트 :

    <a href="https://fonts.google.com" target="_blank">구글 웹 폰트 사이트</a>

font-family

글꼴을 지정할 때 사용
선택자{font-family : 글꼴명;}
    #ff1{
            font-family: 궁서체;
            font-size: 24px;
        }
    #ff2{
            font-family: 고딕체;
        }
    #ff3{
            font-family:'Courier New', Courier, monospace
        }

font-size

글꼴의 크기를 변경할 때 사용
선택자{font-size : 크기(px, em, rm,pt)}
    #ff4{
            font-family: "Noto Sans KR", sans-serif;
            font-optical-sizing: auto;
            font-weight: 400;
            font-style: normal;
            font-size: 24px;
        }

font-weight

글꼴의 굵기를 표현할 때 사용
선택자{font-weight: normal | bold | lighter | 100 ~ 900}
    #fw1{font-weight: bold;} //굵은 글꼴로 변경
    #fw2{font-weight: 900;} //원래 굵기보다 더 굵게
    #fw3{font-weight: 100;} //원래 굵기보다 더 얇게

0개의 댓글