채택완료

css border-radius: 5px; 안쪽으로 할수 잇나요>?

2020-06-15 (월) 16:50:23 5,415

css     border-radius: 5px; 안쪽으로 할수 잇나요>?

3390329810_1592207420.2556.png

|

답변 2개 / 댓글 2개

채택된 답변
+20 포인트
2020-06-15 (월) 16:59:33

3068291145_1592207953.7207.png

<style>

.circle {
  position:absolute; width:20px; height:20px; border-radius:20px; background:#222;
}

.circle1 { left:-10px; top:-10px; }
.circle2 { right:-10px; top:-10px; }
.circle3 { left:-10px; bottom:-10px; }
.circle4 { right:-10px; bottom:-10px; }

</style>

<div style="position:relative; width:200px; height:100px; border:2px solid #222; overflow:hidden;">
  <div class="circle circle1"></div>
  <div class="circle circle2"></div>
  <div class="circle circle3"></div>
  <div class="circle circle4"></div>
</div>

답변에 대한 댓글 1개

2020-06-15 (월) 17:52:47
감사합니다.
2020-06-15 (월) 16:54:24

안쪽으로 하시지 마시고

원 형태의 div 객체를 만드신뒤에 absolute 로 적당한 위치에 자리잡게 하심이 어떨지요..

물론 상위 객체는 overflow:hidden; 값을 주시구요.

답변에 대한 댓글 1개

2020-06-15 (월) 17:52:52
감사합니다.

답변을 작성하려면 로그인이 필요합니다.