Fast Blinking Hello Kitty

SITE 만들기

이미지텍스트유형 페이지 만들기

코른이되고싶은코린이 2023. 3. 15. 01:04

728x90

ImgTextType page

코드블럭

<!DOCTYPE html>
<html lang="ko">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>이미지 텍스트 타입</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        a {
            text-decoration: none;
            color: #000;
        }
        h1,h2,h3,h4,h5,h6 {
            font-weight: normal;
        }
        img {
            vertical-align: top;
            width: 100%;   
        }
        .mt0 {margin-top: 0px !important;}
        .mt10 {margin-top: 10px !important;}
        .mt20 {margin-top: 20px !important;}
        .mt30 {margin-top: 30px !important;}
        .mt40 {margin-top: 40px !important;}
        .mt50 {margin-top: 50px !important;}
        .mt60 {margin-top: 60px !important;}
        .mt70 {margin-top: 70px !important;}
       
        .mb10 {margin-bottom: 10px !important;}
        .mb20 {margin-bottom: 20px !important;}
        .mb30 {margin-bottom: 30px !important;}
        .mb40 {margin-bottom: 40px !important;}
        .mb50 {margin-bottom: 50px !important;}
        .mb60 {margin-bottom: 60px !important;}
        .mb70 {margin-bottom: 70px !important;}
        
        .container {
            width: 1160px;
            margin: 0 auto;
            padding: 0 20px;
            /* background-color: rgba(0, 0, 0, 0.1); */
        }
        .nexon {
            font-family: 'NexonLv1Gothic';
            font-weight: 400;
        }
        .section {
            padding: 120px 0;
        }

        .section.center {
            text-align: center;
        }
        .section__small {
            font-size: 14px;
            border-radius: 50px;
            background-color: #ff7c7c;
            color: #fff;
            padding: 1px 23px;
            text-transform: uppercase;
            margin-bottom: 20px;
            display: inline-block;
        }
        .section__h2 {
            font-size: 50px;
            font-weight: 400;
            margin-bottom: 30px;
            line-height: 1;
        }
        .section__desc {
            font-size: 22px;
            line-height: 25px;
            color: #666666;
            margin-bottom: 70px;
            font-weight: 300;
            line-height: 1.5;
        }
        /* imgtext__type */
        .imgtext__inner {
            display: flex;
        }
        .imgtext__inner .imgtext {
            width: 373px;
            height: 500px;
            margin-left: 20px;
        }
        .imgtext__inner .text {
            width: 374px;
        }
        .imgtext__small {
            font-size: 14px;
            border-radius: 50px;
            padding: 1px 23px;
            background-color: #D78D8D;
            color: #fff;
            text-transform: uppercase;
            display: inline-block;
            margin-bottom: 16px;
        }
        .imgtext__h2 {
            font-size: 50px;
            margin-bottom: 25px;
        }
        .imgtext__text {
            margin-bottom: 15px;
            line-height: 150%;
            color: #666666;
        }
        .imgtext ul li {
            margin-left: 15px;
            line-height: 150%;
            color: #666666;
        }
        .image__img {
            padding: 10px;
        }
    </style>
</head>
<body>
    <section class="text__wrap section nexon">
        <div class="container">
            <div class="imgtext__inner">
                <article class="imgtext text">
                    <span class="imgtext__small">notice</span>
                    <h2 class="imgtext__h2">오사카 먹거리의 종류</h2>
                    <p class="imgtext__text">오사카에는 타코야키, 가츠동, 오꼬노미야키, 교자, 라멘 등등 여러가지 먹거리가 있습니다.</p>
                    <ul>
                        <li>타코야키(Takoyaki)</li>
                        <li>가츠동(カツ丼)</li>
                        <li>오꼬노미야키(Okonomiyakki)</li>
                        <li>교자(交子)</li>
                        <li>라멘(Ramen)</li>
                        <li>유카쿠(Yakitori)</li>
                        <li>꼬치야키(Kushikatsu)</li>
                    </ul>
                </article>
                <article class="imagetext image">
                    <figure class="image__img">
                        <img src="../asset/img/imgtext Type01_01.jpg" alt="타코야키 이미지">
                    </figure>
                </article>
                <article class="imagetext image">
                    <figure class="image__img">
                        <img src="../asset/img/imgtext Type01_02.jpg" alt="가츠동이미지">
                    </figure>  
                </article>      
            </div>
        </div>
    </section>
</body>
</html>

보충설명

▶ 전체 section 태그안에 container태그를 주고 article박스 3개를 만들어 주어 텍스트박스하나와 이미지 박스 두개를 만들어 구조를 잡아줍니다.

▶css를 주기위해 article박스별 class명을 지어줍니다.

▶p태그 안에 간단한 설명입력후 ul>li 태그를 만들어 리스트를 만들어 줍니다.

▶이미지는 img src 태그속 경로를 입력하여 넣어줍니다.

▶부모박스 클래스태그속 자식박스의 태그에 css 속성을 줄 때는 '.' 과 띄어쓰기를 사이에 입력하고

(ex) .imgtext__inner .text),

부모박스 클래스태그속 자식박스 태그명에 속성을 줄 때는 사이에 띄어쓰기만 입력해 줍니다.

(ex) .imgtext ul li)

코드설명

text-transform: uppercase  ☞ 해당 요소에 적용된 텍스트를 모두 대문자로 변환하는 속성.

hover 마우스 포인터가 요소 위로 올라갔을 때 발생하는 이벤트로 요소의 스타일을 변경하거나 애니메이션 효과를 추가 가능.