先看一段代码:
console.log("%c 恭喜发财","color:white;background:red;font-size:88px;");
- %s 字符串
- %d 整型
- %o 对象
扩展阅读:
http://stackoverflow.com/questions/7505623/colors-in-javascript-console
https://dl.dropbox.com/u/39519/talks/html5dc-workflow/index.html#53