Notice
«   2024/09   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
관리 메뉴

Jade_o.o

[css] 문자 관련 속성 본문

CSS

[css] 문자 관련 속성

by jade 2024. 1. 11. 15:29
<!DOCTYPE html>
<html lang="ko">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>문자 관련 속성</title>
    <!-- google fonts : 'Diphylleia';-->
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Diphylleia&display=swap" rel="stylesheet">

    <link rel="stylesheet" href="./attr1.css">
</head>
<body>
    <h2>문자 관련 속성</h2>
    <span class="font-link">안녕하세요</span>
    <span class="font-import">안녕하세요</span>
    <span class="noonnu">안녕하세요</span>

    <div class="container">
        <p class="sentences">
            Lorem ipsum dolor sit amet consectetur adipisicing elit. Quia modi in voluptatum molestias voluptatem mollitia neque, aut itaque laboriosam distinctio tenetur provident optio sequi aliquam sunt. Veniam laboriosam numquam beatae?
        </p>
        <a href="https://www.naver.com">네이버</a>
    </div>
</body>
</html>

html 코드

 

@import url('https://fonts.googleapis.com/css2?family=Single+Day&display=swap');

@font-face {
    font-family: 'DAEAM_LEE_TAE_JOON';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2312-1@1.1/DAEAM_LEE_TAE_JOON.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

.font-link{
    font-family: 'Diphylleia', serif;
}

.font-import{
    font-family: 'Single Day', cursive;
}

.noonnu{
    font-family: 'DAEAM_LEE_TAE_JOON', serif;
}

.sentences{
    font-weight: 700;
    font-size: 16px;
    /* font-size: 1rem; */
    /* font-size: 1em; */

    /* text align */
    text-align: left;
    text-align: right;
    text-align: center;

    /* text-decoration */
    text-decoration: line-through;
    text-decoration: underline;
    text-decoration: overline;
    text-decoration: none;

    /* line-height */
    line-height: 32px;

}

a{
    text-decoration: none;
    /* color: black; */
    /* 색깔 지정 방법 */
    /* 
    1. 색깔 이름 작성: red, black, pink, ..
    2. rgb(-, -, -) -에는 0~255까지의 숫자가 올 수 있음
    3. #------ : #c358ab
     16진수로 이루어진 rgb 값 (0 ~ 9 와 a,b,c,d,e,f 로 이루어진 수)
    */
    color: #f33333;
    
    /* 투명도 조절하는 rgba 함수 */
    color: rgba(0,0,0,0.5);

}

css 코드

 

코드 실행 시 결과창

'CSS' 카테고리의 다른 글

[css] display:flex  (2) 2024.01.11
[css] background 속성  (0) 2024.01.11
[css] position  (0) 2024.01.11
[css] 박스 모델 속성  (0) 2024.01.11
[css] css 공부 정리1_css 기본 정의  (0) 2024.01.11