相思资源网 Design By www.200059.com
纯CSS绘制的六边形

纯css绘制蜂巢六边形效果


复制代码代码如下:
<html>
<head>
<title>Draw Hive</title>
</head>
<style type="text/css">
.hexagon {
display: inline;
float: left;
}
#second {
margin-left: 4px;
}
#third {
clear: left;
margin-left: 54px;
margin-top: -28px;
}
.hiveTop{
width: 0;
border: 30px solid #6C6;
border-top: none;
border-bottom: 30px solid #6C6;
border-left: 52px solid transparent;
border-right: 52px solid transparent;
}
.hiveCenter {
width: 104px;
height: 60px;
background-color: #6C6;
}
.hiveBottom {
width: 0;
border: 30px solid #6C6;
border-bottom: none;
border-top: 30px solid #6C6;
border-left: 52px solid transparent;
border-right: 52px solid transparent;
}
</style>
<body>
<div class="hexagon" id="first">
<div class="hiveTop">
</div>
<div class="hiveCenter">
</div>
<div class="hiveBottom">
</div>
</div>
<div class="hexagon" id="second">
<div class="hiveTop">
</div>
<div class="hiveCenter">
</div>
<div class="hiveBottom">
</div>
</div>
<div class="hexagon" id="third">
<div class="hiveTop">
</div>
<div class="hiveCenter">
</div>
<div class="hiveBottom">
</div>
</div>
</body>
</html>
标签:
css,蜂巢六边形

相思资源网 Design By www.200059.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
相思资源网 Design By www.200059.com

评论“纯css绘制蜂巢六边形效果”

暂无纯css绘制蜂巢六边形效果的评论...