<!-- - CSS wielokąty - rysowanie figur i kształtów, generatory - https://danielpietrasik.pl/css-wielokaty/ --> <div id="hexagon"></div>
/** * CSS wielokąty - rysowanie figur i kształtów, generatory * https://danielpietrasik.pl/css-wielokaty/ **/ #hexagon { font-size: 12px; /* Sterowanie rozmiarem figury. */ width: 10em; height: 4em; background-color: #F34A53; position: relative; margin: 75px auto 0; } #hexagon:before { content: ''; position: absolute; top: 4em; left: 0; border-top: 3em solid #F34A53; border-left: 5em solid transparent; border-right: 5em solid transparent; } #hexagon:after { content: ''; position: absolute; bottom: 4em; left: 0; border-bottom: 3em solid #F34A53; border-left: 5em solid transparent; border-right: 5em solid transparent; }