Simon Willison’s Weblog

Diagonal shapes with CSS

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.

This is Diagonal shapes with CSS by Simon Willison, posted on 4th July 2003.

Next: XML-RPC Errata

Previous: Simple Python Sockets

Previously hosted at