<!DOCTYPE HTML> <html> <head> <style> body::first-letter { float: left; } </style> </head> <body style="width:0"> mm mm mm mm mm mm mm mm mm mm mm mm mm mm mm <span id="a"></span> <script> document.body.offsetWidth; document.getElementById('a').setAttribute('style', 'display: block;'); </script> </body> </html>