2022.05.26

Ayla’s·2022년 5월 26일
.side-box:before{
    display: block;
    width:2rem; /* 16px * 2 */
    height:2rem;
    text-align: center;   /*글씨 정렬*/
    background-color: #fff;
    position: absolute;
    top:-1rem;
    left:0;
    right:0;
    margin:auto;
}
.side-box a:hover{   /*마우스 올릴 때 색이 바뀜*/
    color: #7ac69f;
}
.side-box h3{
    font-family: 'Amatic SC', cursive;
    font-size: 1.875rem;
    letter-spacing: .1rem;
    text-align: center;
    margin: .875rem 0 1.125rem;
}

목록

.side-box li{
    border-bottom: 1px dashed #ccc;
    padding: 1rem .25rem;
    display:flex;
}
.side-box li:last-child{   /*마지막 줄 삭제*/
    padding-bottom: .5rem;
    border-bottom: 0;
}
.side-box li:first-child{ 
    padding-top:0;
}
.side-box li:before{ 
    display: inline-block;
    content:'';
    background-color: #93d8d0;
    width: 8px;
    height: 8px;
    border-radius: 50%;  /*기호를 동그랗게*/
    margin: 6px 10px 0 0;
}
.side-box li a{
    flex:1; /*원래 크기 유지*/
    line-height: 1.4;
}

.newsletter-form{
    display:flex;
    margin-top:1.5rem;
}
.newsletter-form input[type='email']{
    border: 2px solid #ccc; /*테투리선*/
    border-radius: 10px 0 0 10px; 
    background-color: #fff;
    padding: 1rem;
    width: 75%;
}
.newsletter-form input[type='email']:placeholder{
    color:#ccc;
}
.newsletter-form input[type='submit']{
    background-color: #eda1a1;
    border-radius: 0 10px 10px 0;
    color: #fff;
    cursor:pointer; /*클릭 할 수 있도록*/
    padding: 1.1rem;
    margin-left: -5px;
}
.newsletter-form input[type='submit']:hover{
    background-color: #e38787;
}
.popular-posts{
    margin-bottom: 2rem;
}

/**** footer ****/
footer{
    background-color: #949087;
    text-align: center;
    padding: 3rem;
}
footer ul{
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}
footer li{
    margin: 0 12px;
}
footer a{
    color: #fff;
}
footer a:hover{
    color: #c7c3ba;
}
footer small{
    color: #c7c3ba;
    font-size: .875rem;
}

Desktop size

@media (min-width: 600px){
    .container{
        display: flex;
        justify-content: space-between; /*사이 공간을 같게 줌*/
        margin-bottom: 4rem;
        padding: 1rem 2.5rem 2.5rem;
    }
    header{
        height: 190px;
    }
    .page-title{
        margin: 1rem 0 2rem;
    }
    .page-desc{
        font-size: 1.125rem;
        margin-bottom: 4rem;
    }
    
    section{
        width: 68%;
        margin-bottom:0;
    }
    .post-thumb{
        margin: 0 1rem 1rem 0;
        shape-outside: circle();
        float:left;
    }
    .post-img{
        width: 220px;
        height: 180px;
    }
    aside{
        width: 26%;
    }
    .popular-posts{
        position: sticky;
        top: 1rem;
    }
}

헷갈렸던 부분 / 해결방법 / 소감

강사님의 설명을 따라 차근차근 코드를 작성했지만 수업 이후 혼자서 다시 해보려하니 역시나 역부족이었다. 그래도 새로운 페이지를 완성하여 뿌듯하다. 완전히 내것으로 만들 수 있도록 더욱 노력해야겠다.

0개의 댓글