There will be a gap between two divs side by side

Two side-by-side DIVs will have a gap as shown below

because the code

There is a 'carriage return' before the two DIVs

It's OK to write

But why there is such a problem is that the browser treats characters such as space, carriage return, and tab key as a space, so there will be a gap when you enter the carriage return.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324981830&siteId=291194637