【发布时间】:2021-07-11 10:51:09
【问题描述】:
我正在使用 NW.js(node-webkit) 制作桌面应用程序
基于此主题google chrome console, print image,打印图像我正在尝试将图像显示到控制台。
正如上面主题所建议的,下面的命令效果很好:
console.log('%c ', 'font-size:400px; background:url(https://pics.me.me/codeit-google-until-youfinda-stackoverflow-answerwith-code-to-copy-paste-34126823.png) no-repeat;');
问题是,当我尝试与本地文件 url 完全相同的事情时,例如
console.log('%c ', 'font-size:400px; background:url(./res/hoge.png) no-repeat;');
console.log('%c ', 'font-size:400px; background:url(file:///C:/Users/hoge/Pictures/hoge.png) no-repeat;');
控制台不显示任何内容。
我发现了类似的问题How to display local image to console?似乎还没有解决。
【问题讨论】:
标签: javascript node.js google-chrome-devtools node-webkit nwjs