code 元素不保留多余的空格和折行:

如需解决该问题,您必须在 pre 元素中包围代码:

var person = {
    firstName:"Bill",
    lastName:"Gates",
    age:50,
    eyeColor:"blue"
}