CSSBattle Apr 21, 2025

zimablue·2025년 4월 21일

CSSBattle

목록 보기
14/31

문제

풀이

<div class="container">
  <div class="wrapper">
    <div class="box red">
      <div class="small-box"></div>
    </div>
    <div class="half-circle red"></div>
  </div>
  <div class="wrapper flipped">
    <div class="box green">
      <div class="small-box"></div>
    </div>
    <div class="half-circle green"></div>
  </div>
</div>
* {
  box-sizing: border-box;

  margin: 0;
}

.container {
  width: 100vw;
  height: 100vh;
  
  background: #4C455B;
}

.wrapper {
  display: flex;
  align-items: end;
  
  width: 100%;
  height: 50%;
}

.box {
  display: flex;
  align-items: end;
  
  width: 120px;
  height: 120px;
}

.small-box {
  width: 60px;
  height: 60px;

  background: #4C455B;
}

/* 반원 */
.half-circle {
  width: 160px;
  height: 80px;

  border-radius: 150px 150px 0 0;
}

.flipped {
  background: #4C455B;
  
  transform: rotate(180deg);
}

.red {
  background: #D96C7B;
}

.green {
  background: #8AB8B6;
}

0개의 댓글