空白
空白
当浏览器遇到两个或两个以上的连续空格时,只将其显示为一个空格。同样,当遇到一次换行时,浏览器也会将其看作一个空格。这一特性称为白色空间折叠。
<!DOCTYPE html> <!-- To change this license header, choose License Headers in Project Properties. To change this template file, choose Tools | Templates and open the template in the editor. --> <html> <head> <title>空白</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> </head> <body> <div>空白</div> <p>1 2 3 4 5 6 </p> <p>1 2 3 4 5 6 </p> <p>1 2 3 4 5 6 </p> </body> </html>