作者:快乐天使小可爱66 | 来源:互联网 | 2022-11-25 18:39
我试图做这个按钮:
边界与纯css但没有成功.是否可以使用纯css或其他技巧创建.
谢谢
1> Temani Afif..:
您可以考虑多个背景和渐变:
.button {
display:inline-block;
padding:20px 25px;
background:
linear-gradient(grey,grey) top left /80% 3px,
linear-gradient(grey,grey) bottom right/80% 3px,
linear-gradient(grey,grey) 0 calc(100% - 8px)/90% 3px,
linear-gradient(grey,grey) 100% 8px /90% 3px,
linear-gradient(to bottom,grey 50%,transparent 50%,transparent 80%,grey 0) left top /3px calc(100% - 8px),
linear-gradient(to top,grey 50%,transparent 50%,transparent 80%,grey 0) right bottom/3px calc(100% - 8px);
background-repeat:no-repeat;
}
Discover