简要咨询咨询QQ网站导航网站搜索手机站点联系我们设为首页加入收藏 

纯css绘制蜂巢六边形效果

来源:易贤网   阅读:1073 次  日期:2016-06-15 09:28:50

温馨提示:易贤网小编为您整理了“纯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>

更多信息请查看网页制作
点此处就本文及相关问题在本站进行非正式的简要咨询(便捷快速)】     【点此处查询各地各类考试咨询QQ号码及交流群
上一篇:浏览器缓存相关http头尽量减少http的请求次数
下一篇:http头部信息解释分析(详细整理)
易贤网手机网站地址:纯css绘制蜂巢六边形效果
由于各方面情况的不断调整与变化,易贤网提供的所有考试信息和咨询回复仅供参考,敬请考生以权威部门公布的正式信息和咨询为准!