CSS3如何写一个六边形图形代码:
html:
<div class="sharp"><div class="sharpb"><b>01</b></div></div>
css:
.sharp {background-color: #999; width: 134px;
height: 151px; padding: 5px;
webkit-clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.sharpb {background-color: #fff; width: 134px; height: 151px; line-height: 151px; text-align: center;
webkit-clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);}
.sharp b {color: #333; font-size: 40px;}
.sharp:hover {background-color: #36ABB4;}
.sharp:hover b {color: #36ABB4;}
新起点博客



![装phpnow服务[Apache_pn]提示失败的解决方法-新起点博客](https://www.henenseo.com/wp-content/uploads/2020/05/1-3.png)
评论前必须登录!
注册