如何确定导航栏过渡周围的边界?

时间:2019-04-15 16:16:41

标签: html css

单击导航栏后,我将导航栏过渡为一个圆形,该圆形会立即扩展,我可以在顶部和左侧边框看到细线背景。

nav {
    position: fixed;
    width: 100%;
    border: solid 3px white;
    height: 5vh;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
}

.nav-links {
    position: fixed;
    background: black;
    margin: 0;
    height: 100%;
    width: 100%;
    flex-direction: column;
    clip-path: circle(100px at -15% -15%);
    -webkit-clip-path: circle(100px at -15% -15%);
    transition: all 1s ease-out;
    pointer-events: all;
}

.nav-links.open {
    clip-path: circle(1500px at -15% -15%);
    -webkit-clip-path: circle(1500px at -15% -15%);
}

0 个答案:

没有答案