CSSBattle Apr 26, 2025

zimablue·2025년 4월 26일

CSSBattle

목록 보기
19/31

문제

풀이

HTML

<div class="container">
  <div class="wrapper">
    <div class="circle red"></div>
  </div>
  <div class="wrapper flipped">
    <div class="circle red"></div>
  </div>
  <div class="circle transparent"></div>
</div>

CSS

* {
  box-sizing: border-box;

  margin: 0;
}

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

.wrapper {
  position: relative;
  
  display: flex;
  flex-direction: row;
  overflow: hidden;
  
  width: 110px;
  height: 140px;

  border: 10px solid #282828;
}

.circle {
  position: absolute;

  width: 120px;
  height: 120px;

  border-radius: 50%;
}

.red {
  background: #EA3323;
}

.flipped {
  transform: rotateY(180deg);
}

.transparent {
  border: 30px solid #282828;
  
  background: transparent;
}

0개의 댓글