我试图在 CSS 中制作一个五边形,但中间顶点大约有一个 1 像素宽的间隙:
.shape-pentagon {
position: relative;
width: 5.4rem;
box-sizing: content-box;
border-width: 5.0rem 1.8rem 0rem;
border-style: solid;
border-color: $primary transparent;
&::before {
content: "";
position: absolute;
height: 0;
width: 0;
top: -8.5rem;
left: -1.8rem;
border-width: 0rem 4.5rem 3.5rem;
border-style: solid;
border-color: transparent transparent $primary;
}
}
我似乎无法轻推属性来解决这个问题。有没有人有一个更漂亮的五角大楼或修复共享?
本站系公益性非盈利分享网址,本文来自用户投稿,不代表码文网立场,如若转载,请注明出处
评论列表(54条)