CSSBattle Apr 28, 2025

zimablue·2025년 4월 28일

CSSBattle

목록 보기
21/31

문제

풀이

HTML

<div class="container">
  <div class="pill"></div>
  <div class="line"></div>
  <div class="line"></div>
</div>

CSS

* {
  box-sizing: border-box;

  margin: 0;
}

.container {
  position: relative;

  display: flex;
  flex-direction: column;
  justify-content: center;
  
  width: 100vw;
  height: 100vh;
  
  background: #66DBB8;
}

.pill {
  position: absolute;
  top: 50%;
  left: 50%;
  
  width: 100px;
  height: 200px;

  border: 15px solid #4C4C6B;
  border-radius: 50px;

  transform: translate(-50%, -50%)
}

.line {
  border: solid #4C4C6B;
  border-width: 20px 0;

  width: 100%;
  height: 50px;
}

0개의 댓글