본문 바로가기
CSS

round tab, css

by 영감은어디에 2025. 3. 3.

<nav>
    <a href="#home" style="--clr: #ff4d4d;" class="active">Home</a>
    <a href="#about" style="--clr: #c56cf0;">About</a>
    <a href="#services" style="--clr: #ffeaa7; ">Services</a>
    <a href="#portfolio" style="--clr:#17c0eb; ">Portfolio</a>
    <a href="#contact" style="--clr:#fd79a8; ">Contact</a>
</nav>
header nav a.active {
    background: var(--clr);
}
header nav a.active::before {
    content: '';
    position: absolute;
    left: -20px;
    bottom: 0;
    width: 20px;
    height: 20px;
    background: transparent;
    border-bottom-right-radius: 10px;
    box-shadow: 5px 5px 0 5px var(--clr);
    z-index: 2;
}
header nav a.active::after {
    content: '';
    position: absolute;
    right: -20px;
    bottom: 0;
    width: 20px;
    height: 20px;
    background: transparent;
    border-bottom-left-radius: 10px;
    box-shadow: -5px 5px 0 5px var(--clr);
    z-index: 2;
}

'CSS' 카테고리의 다른 글

42dot Sans 한글 폰트 웹에서 적용하기  (0) 2025.04.15
:is(), :where()  (0) 2025.04.15
css 3d, transform-style: preserve-3d  (0) 2025.03.07
filter: drop-shadow  (0) 2024.10.18
mouse move  (0) 2024.10.17
나눔스퀘어 네오 폰트, 웹폰트로 사용법  (0) 2024.10.01
배경 그라디언트 애니메이션  (0) 2024.10.01
li 점 색상 바꾸기 CSS  (0) 2024.09.02