Arthur B. Arthur B. - 1 year ago 98
CSS Question

Fill the browser window with random digits

I would like to fill the visible window in a webpage with random digits. The way I am currently trying to do this involves a long string of random digit first, and then using the following property on a div:

font-family: "Inconsolata", monospace;
word-break: break-all;
font-size: 3em;
color: #202020;
height: 100%;
width: 100%;

It works(ish) on Chrome, but it takes a very noticeable amount of time to reflow after resizing the browser window. Is there any way to make this seamless?

Answer Source

Use overflow-wrap: break-word instead of word-break: break-all.

word-wrap was recently renamed to overflow-wrap, so to support other browsers you may want to specify both:

word-wrap: break-word;
overflow-wrap: break-word;

Possibly relevant Chrome bug:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download