CSS가있는 도형을 만들려고합니다. 둥근 육각형 (길쭉한 모양)입니다. 나는 몇 가지 다른 방법을 생각해 보았습니다. (몸통 상자와 꼭대기와 바닥에 2 개의 둥근 삼각형이 있습니다.) 그러나 지금까지는 좋은 점이 없었습니다. 누구나 CSS에서이 모양을 만들 수있는 아이디어가 있습니까?CSS3 또는 캔버스 둥근 육각형
HTML
<div id="hexagon"></div>
CSS
#hexagon {
width: 100px;
height: 55px;
background: red;
position: relative;
}
#hexagon:before {
content: "";
position: absolute;
top: -25px;
left: 0;
width: 0;
height: 0;
border-left: 50px solid transparent;
border-right: 50px solid transparent;
border-bottom: 25px solid red;
}
#hexagon:after {
content: "";
position: absolute;
bottom: -25px;
left: 0;
width: 0;
height: 0;
border-left: 50px solid transparent;
border-right: 50px solid transparent;
border-top: 25px solid red;
}
당신은 Fi를 할 수 있습니다 여기에 몇 가지 정보를 찾아라. http://stackoverflow.com/questions/14665093/is-it-possible-to-rounded-shapes-shapes-such-as-hexagon-octagon –
http://kizu.ru/Polygons/ –