1.css怎么做出六边形图片
1 2 3 #hexagon { 2 width: 100px; 3 height: 55px; 4 background: red; 5 position: relative; 6 } 7 #hexagon:before { 8 content: ""; 9 position: absolute;10 top: -25px;11 left: 0;12 width: 0;13 height: 0;14 border-left: 50px solid transparent;15 border-right: 50px solid transparent;16 border-bottom: 25px solid red;17 }18 #hexagon:after {19 content: "";20 position: absolute;21 bottom: -25px;22 left: 0;23 width: 0;24 height: 0;25 border-left: 50px solid transparent;26 border-right: 50px solid transparent;27 border-top: 25px solid red;28 }。
2.div怎么在dw里写代码让他变成六边形
对是可以变形的,关键看你的css学的怎样(复制下面代码,试试) <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " 1/DTD/xhtml1-transitional.dtd">
<meta ; charset=gb2312" />- DEMOSMENUS
- LAYOUTS
- BOXES
- MOZILLA
- CodeFans.net
- OPACITY