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

home2 게시판 HTML/CSS 게시판 포트폴리오 1번 과제 질문드립니다.

포트폴리오 1번 과제 질문드립니다.

  • 이 주제에는 1개 답변, 2명 참여가 있으며 codingapple2 년 전에 전에 마지막으로 업데이트했습니다.
2 글 보임 - 1 에서 2 까지 (총 2 중에서)
  • 글쓴이
  • #85750

    진의정
    참가자
    width :768 이하 에서 세로로 정렬을 하고 싶습니다.
    
     width가 768px 이하일 때 flex-direction :column; 작성 시 자식 div 가 세로로 정렬되길 기대했지만
    이미지를 포함한 div가 다른 div 내용을 가립니다. 
    
    요약하자면 class="hcontainer" 에 flex-direction: column; 속성을 줬는데 이미지가 생각대로 동작을 안 합니다.
    도와주세요
    
    
    
    <body>
      <div class="hcontainer">
        <div class="hcontainer-content">
          <div class="content-wrap">
            <h1 class="ft">Landing Page for Apps</h1>
            <p class="ft">Lorem ipsum dolor sit amet, consectetur adipisicing elit<br>
            Voluptatum, rem, distinctio! Dolores doloremque.</p>
            <button class="button">Show More</button>
          </div>
        </div>
        <div class="hcontainer-content">
          < img src="iphone.png" class="h-img">
        </div>
      </div>
    </body>
    ----------------------------------------------------------------
    .hcontainer{
      background: linear-gradient(to bottom, blue, violet);
      width: 100%;
      height: 500px;
      display:flex;
      margin:0;
      padding:10px;
      box-sizing: border-box;
      position: relative;
    }
    .hcontanier-content{
      flex:1;
    }
    .button{
      background-color: lightslategray;
      color:white;
      margin:auto;
      width:20%;
      height: 35px;
      padding:5px;
      border-radius: 5px;
      border:none;
    }
    .button:hover{
      cursor: pointer;
    }
    .content-wrap{
      margin:60px;
      padding:10px;
    }
    .ft{
      color:white;
    }
    .h-img{
      width:60%;
      height: auto;
      max-width:300px;
      max-height:400px;
      box-sizing: border-box;
      position: absolute;
      bottom:0;
      right:0;
      margin-right:100px;
    }
    @media screen and (max-width: 768px){
      .hcontainer{
        background: linear-gradient(to bottom, blue, violet);
        width: 100%;
        display:center;
        margin:auto;
        padding:10px;
        box-sizing: border-box;
        text-align:center;
        flex-direction: column;
        position: relative;
      }
      .hcontanier-content{
        flex:1;
        width:100%;
        margin:0;
      }
    }
    
    #85755

    codingapple
    키 마스터
    position absolute 주면 공중에 떠서 그건 뺍시다
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 호 / 개인정보관리자 : 박종흠