Diagonal shapes with CSS
4th July 2003
Information on Border Slants (via Paul Hammond). Border slants are the effect whereby diagonal lines can be created using pure CSS, by taking advantage of the fact that thick borders around a box meet at an angle. This article describes the effect in detail and shows how it can be used to achieve a number of interesting shapes, then goes on to show off with an impressive Valentine’s Day Heart. See also Tantek’s awesome pentagon site map and A Study of Regular Polygons.
More recent articles
- Image segmentation using Gemini 2.5 - 18th April 2025
- GPT-4.1: Three new million token input models from OpenAI, including their cheapest model yet - 14th April 2025
- CaMeL offers a promising new direction for mitigating prompt injection attacks - 11th April 2025