CSS3 원형 테두리 부분 두께 조절 문의드립니다.

CSS3 원형 테두리 부분 두께 조절 문의드립니다.

QA

CSS3 원형 테두리 부분 두께 조절 문의드립니다.

답변 1

본문

안녕하세요 아래 첨부한 이미지 처럼

원형 박스 테두리가 부분적으로 두께를

다르게 만들수 있을까요? 

어떻게 해야하는지 제발 알려주세요 부탁드립니당 ㅠㅠ 

 

 

3554994364_1737348509.8124.png

이 질문에 댓글 쓰기 :

답변 1

rotate(56deg) 부분 수정해서 굵은 원 위치 조정하시면됩니다.

 

<style>
    .circle-demo {
        width: 200px;
        height: 200px;
        border-radius: 50rem;
        border: 1px solid red;
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .circle-demo:before {
        content: '';
        position: absolute;
        left: 50%;
        top: 50%;
        width: calc(100% - 4px);
        height: calc(100% - 4px);
        border-radius: 50rem;
        border: 5px solid red;
        clip-path: polygon(50% 0, 100% 0, 100% 50%, 50% 50%);
        transform: translate(-50%, -50%) rotate(56deg);
        transform-origin: center center;
    }

</style>



<div class="circle-demo" >
<p>TEXT</p>
</div>

답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
filter #css3 ×
전체 112
© SIRSOFT
현재 페이지 제일 처음으로