• 로그인
  • 장바구니에 상품이 없습니다.

home2 게시판 HTML/CSS 게시판 dlsplay : flex로 반응형 구현 중 문제

dlsplay : flex로 반응형 구현 중 문제

2 글 보임 - 1 에서 2 까지 (총 2 중에서)
  • 글쓴이
  • #55568
      
     
     
    
    
    HTML 부분
    
        <div class="services">
            <div class="services__element">
                <h3>Fast Shipping</h3>
                <p>lorem ipsum</p>
            </div>
            <div class="services__element">
                <h3>Good Service</h3>
                <p>lorem ipsum</p>
            </div>
            <div class="services__element">
                <h3>free Coupons</h3>
                <p>lorem ipsum</p>
            </div>
            <div class="services__element">
                <h3>New Products</h3>
                <p>lorem ipsum</p>
            </div>
    
    CSS 부분
    
    .services {
        display: flex;
        justify-content: space-between;
        padding: 30px 90px;
        flex-wrap: nowrap;
    }
    .services__element {
        text-align: center;
        width: 300px;
    }
    .services div {
        border : 1px solid;
    }
    @media screen and (max-width: 1200px) {
        .title {
            margin-top: 50px;
            font-size: 30px;
        }
        .text {
            margin: 50px;
            font-size: 18px;
            line-height: 28px;
        }
        .services {
            flex-wrap: wrap;
            padding: 30px 150px;
        }
        .services__element {
            width: 300px;
        }
    }
    @media screen and (max-width: 768px) {
        .title {
            font-size: 20px;
        }
        .text {
            margin: 50px;
            font-size: 15px;
            line-height: 26px;
        }
        .services {
            flex-wrap: wrap;
            justify-content: center;
        }
        .services__element {
            width: 300px;
        }
    }
    -----------------------------------------------
    
    PC 화면에서는 nowrap 속성으로 박스들 경계가 닿아도 넘치지 않도록 구현했고
    태블릿 화면(1200px)에서는 wrap 속성을 줘서 과제를 구현하려고 했는데
    모바일 화면(768px)으로 넘어가기 전의 769~916px에서는 2번 사진처럼 배열이 저따구로 가버리네요
    
    그렇다고 박스들의 폭을 250px 정도로 줄여버리면 1000px을 넘어간 시점에서 밑의 사진처럼 나옵니다
    
     
    
    
    
    애플맨 도와줘요...
     
     
     
     
     
     
     
     
     
     
    #55607

    codingapple
    키 마스터
    박스들 폭을 px말고 퍼센트같은걸로 줘봅시다
2 글 보임 - 1 에서 2 까지 (총 2 중에서)
  • 답변은 로그인 후 가능합니다.

About

현재 월 700명 신규수강중입니다.

  (09:00~20:00) 빠른 상담은 카톡 플러스친구 코딩애플 (링크)
  admin@codingapple.com
  이용약관
ⓒ Codingapple, 강의 예제, 영상 복제 금지
top

© Codingapple, All rights reserved. 슈퍼로켓 에듀케이션 / 서울특별시 강동구 고덕로 19길 30 / 사업자등록번호 : 212-26-14752 온라인 교육학원업 / 통신판매업신고번호 : 제 2017-서울강동-0002 호 / 개인정보관리자 : 박종흠