CSSBattle Apr 12, 2025

zimablue·2025년 4월 12일

CSSBattle

목록 보기
6/31

문제

풀이

<div class="container">
  <div class="cylinder">
    <div class="top">
      <div class="hole"></div>
    </div>
    <div class="body"></div>
  </div>
</div>
* {
  margin: 0;
  box-sizing: border-box;
}

.container {
  display: flex;
  justify-content: center;
  align-items: center;
  
  width: 100vw;
  height: 100vh;
  background: #E3CC9E;
}

.cylinder {
  position: relative;
  width: 300px;
  height: 220px;
}

.hole {
  z-index: 10;
  
  width: 140px;
  height: 20px;
  background: #6C3232;
  border-radius: 100%;
}

.top {
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 5;
  
  width: 100%;
  height: 40px;
  background: #FFFFFF;
  border-radius: 100%;
}

.body {
  width: 100%;
  height: 100%;
  background: #995757;
  border-radius: 50% / 9%;
}

0개의 댓글