사이트 만들기

사이트 만들기 (텍스트 유형) !

Kim do hyun 2023. 3. 18. 11:12
728x90
반응형

사이트 만들기 텍스트 유형편

보더콜리를 주제로 한 사이트 텍스트 유형 부분입니다.
기준선과 레이아웃 그리드는 카드, 이미지, 슬라이드 유형과 동일합니다.

 

 

피그마 디자인

아래는 코드로 만든 과정입니다.

 

 

HTML

<body>
    <section class="text__wrap section center nexon">
        <div class="container">
            <span class="section__small">notice</span>
            <h2 class="section__h2 mb70">보더콜리의 어두운면</h2>
            <div class="text__inner">
                <div class="text t1">
                    <h3 class="text__title">참을 수 없는 지루함</h3>
                    <p class="text__desc">보더콜리는 매우 지능적인 개 종 중 하나이지만, 충분한 정신 자극이 부족하면 지루함을 느끼게 됩니다. 이는 보더콜리가 학습 능력을 잃게 만들 수 있습니다.</p>
                    <a class="text__btn" href="#">더보기</a>
                </div>
                <div class="text t2">
                    <h3 class="text__title">운동 부족 시 파괴적인 행동</h3>
                    <p class="text__desc">보더콜리는 매우 활발하고 에너지가 많기 때문에 충분한 운동이 제공되지 않을 경우 이러한 에너지를 적절하게 소비하지 못하게 되어 파괴적인 행동을 할 가능성이 있습니다.</p>
                    <a class="text__btn" href="#">더보기</a>
                </div>
                <div class="text t3">
                    <h3 class="text__title">필요 이상의 충성심</h3>
                    <p class="text__desc">보더콜리는 사육 개체와 밀접한 관계를 형성하여 강아지 복종성에 대한 과도한 의존성을 초래할 수 있습니다. 이는 적절한 교육과 사회화로 극복할 수 있습니다.</p>
                    <a class="text__btn" href="#">더보기</a>
                </div>
                <div class="text t4">
                    <h3 class="text__title">불안정한 감정 공유</h3>
                    <p class="text__desc">보더콜리는 뛰어난 지능을 가지고 있기 때문에 주인의 행동, 표정, 감정에 민감하게 반응 합니다. 주인의 부정적인 감정이나 행동이 보더콜리에게 불안감을 일으킬 수 있습니다.</p>
                    <a class="text__btn" href="#">더보기</a>
                </div>
                <div class="text t5">
                    <h3 class="text__title">사냥 본능</h3>
                    <p class="text__desc">보더콜리는 다른 개 종과 마찬가지로, 사냥 본능으로 인해 이동하는 것을 추적하거나, 경계심으로 인해 주위를 주시하거나, 경쟁심으로 인해 다른 개와 대립할 수 있습니다.</p>
                    <a class="text__btn" href="#">더보기</a>
                </div>
                <div class="text t6">
                    <h3 class="text__title">교육과 훈련</h3>
                    <p class="text__desc">보더콜리는 지능이 높아서 학습 능력이 뛰어나지만, 때로는 너무 똑똑해서 교육이 어려울 수 있습니다. 이것은 보더콜리가 자신의 방식대로 행동하려는 경향이 있어서 발생할 수 있습니다.</p>
                    <a class="text__btn" href="#">더보기</a>
                </div>
            </div>
        </div>
    </section>
</body>

 

 

CSS

<style>
    /* reset */
    * {
        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%;
    }
    .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;}

    /* common */
    .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: #727272;
        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;
        color: #666;
        margin-bottom: 70px;
        font-weight: 300;
        line-height: 1.5;
    }
    /* text__wrap */
    .text__inner {
        text-align: left;
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
    }
    .text__inner .text {
        width: 32.33333%;
        border: 1px solid #f5f5f5;
        border-radius: 10px;
        padding: 90px 20px 20px 20px;
        box-sizing: border-box;
        margin-bottom: 20px;
        transition: all 0.3s;
        cursor: pointer;
        position: relative;
    }
    .text__inner .text:hover {
        background-color: #f5f5f5;
    }
    .text__inner .text::before {
        content: '';
        width: 60px;
        height: 60px;
        background-color: #ce3939;
        background-image: url(../asset/img/textType01.svg);
        background-repeat: no-repeat;
        background-position: center;
        position: absolute;
        left: 20px;
        top: 20px;
        border-radius: 50%;
    }
    .text__inner .text.t1::before {
        background-color: #ff6d6d;
        background-image: url(../asset/img/textType01.svg);
    }
    .text__inner .text.t2::before {
        background-color: #ffdf6d;
        background-image: url(../asset/img/textType02.svg);
    }
    .text__inner .text.t3::before {
        background-color: #93ff6d;
        background-image: url(../asset/img/textType03.svg);
    }
    .text__inner .text.t4::before {
        background-color: #6dffcb;
        background-image: url(../asset/img/textType04.svg);
    }
    .text__inner .text.t5::before {
        background-color: #6d8dff;
        background-image: url(../asset/img/textType05.svg);
    }
    .text__inner .text.t6::before {
        background-color: #d06dff;
        background-image: url(../asset/img/textType06.svg);
    }
    .text__title {
        font-size: 24px;
        margin-bottom: 10px;
    }
    .text__desc {
        font-size: 16px;
        color: #666;
        margin-bottom: 15px;
        line-height: 1.5;
    }
    .text__btn {
        float: right;
        position: relative;
        padding-right: 20px;
    }
    .text__btn::before {
        content: '';
        position: absolute;
        right: 0;
        top: 0;
        width: 15px;
        height: 15px;
        background-image: url(../asset/img/iconplus.svg);
        transition: all 0.3s;
    }
    .text__btn:hover::before {
        transform: rotate(360deg);
    }
</style>

CSS 코드 설명

display: 이 속성은 요소의 표시 방법을 설정합니다. 예를 들어, block, inline, inline-block 등이 있습니다.

text-align: 이 속성은 텍스트의 수평 정렬을 설정합니다. 예를 들어, left, center, right 등이 있습니다.

display: 이 속성은 요소의 표시 방법을 설정합니다. 예를 들어, block, inline, inline-block 등이 있습니다.

flex-wrap: 이 속성은 flex 컨테이너의 아이템들이 한 줄에 배치되지 않을 경우 줄 바꿈을 어떻게 처리할지 설정합니다. 예를 들어, nowrap, wrap, wrap-reverse 등이 있습니다.

justify-content: 이 속성은 flex 컨테이너 내의 아이템들을 수평 방향으로 정렬합니다. 예를 들어, flex-start, flex-end, center, space-between, space-around 등이 있습니다.

width: 이 속성은 요소의 너비를 설정합니다.

height: 이 속성은 요소의 높이를 설정합니다.

border: 이 속성은 요소의 테두리를 설정합니다. 예를 들어, border-width, border-style, border-color 등이 있습니다.

border-radius: 이 속성은 요소의 테두리의 모서리를 둥글게 만듭니다.

box-sizing: 이 속성은 요소의 크기 계산 방법을 설정합니다. 예를 들어, content-box, border-box 등이 있습니다.

transition: 이 속성은 CSS 속성이 변화할 때 애니메이션을 적용할 수 있도록 합니다.

cursor: 이 속성은 마우스 커서의 모양을 설정합니다. 예를 들어, pointer, default 등이 있습니다.

content: 이 속성은 가상 요소의 콘텐츠를 정의합니다.

background-color: 이 속성은 요소의 배경 색상을 설정합니다.

background-image: 이 속성은 요소의 배경 이미지를 설정합니다.

background-repeat: 이 속성은 배경 이미지가 반복되는 방법을 설정합니다.

background-position: 이 속성은 배경 이미지의 위치를 설정합니다.

 

 

완성된 화면