Hexagon


SUBMITTED BY: Guest

DATE: March 5, 2013, 10:25 a.m.

FORMAT: CSS

SIZE: 585 Bytes

HITS: 1156

  1. #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. }

comments powered by Disqus