<!DOCTYPE html> <html><head> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"><style> #rot { width: 300px; /* the div is partially outside of the viewport */ height: 300px; background: red; position: absolute; left: -150px; top: -150px; } </style> </head><body><div style="transform: rotate(72deg);" id="rot"> <canvas width="1" height="1" id="c" style="display:block"></canvas> </div> <script> </script></body></html>