改变console.log的输出样式
2024-08-27 22:16:18
console.log允许你通过css来格式化输出,格式如下:
console.log(‘%c字符串%c字符串’, 样式1, [样式2])
其中”%c”为模板字符串
例子:
1
|
console.log('%cHello','color:#fff;background:red')
|
改变多个样式
1
|
console.log('%cHello %cWord','color:#fff;background:red','color:white;background:#ccc')
|
最新文章
- Android之debug---menu的getActionView()return null
- aes加密C语言
- ApplicationContext更强的功能-学习笔记
- Mysql快速删除表中重复的数据
- General Motors China
- 快速开发CSS的利器-LESS
- jeecg团队招新人(5人)
- 《APUE》第五章练习1
- 层层递进Struts1(八)之总结
- 疯狂学习java web3(javaScript)
- jQuery简单导航示例
- pl/sql查询中文乱码
- C语言 动态数组实现
- 【转载】The Elements of Programming Style之代码风格金科玉律
- 进阶-MongoDB 知识梳理
- S7-200与SMART 200之间进行数据通讯与监控
- php ReflectionClass类遍历类中包含元素的方法
- net core体系-web应用程序-4asp.net core2.0 项目实战(1)-7项目缓冲方案( Redis)
- JDK命令行工具
- echarts之折线图配置(附带图例很多做成分页效果)
热门文章
- POJ - 3494 Largest Submatrix of All 1’s 单调栈求最大子矩阵
- ASP.NET中MessageBox的实现
- 在linux上部署tomcat服务
- lightoj 1027【数学概率】
- Vertex Lit 顶点光照
- U3D手游《苍穹变》性能优化经验谈
- Unity2D研究院之自动生成动画、AnimationController、Prefab(一)
- Integrative Analysis of MicroRNAome, Transcriptome, and Proteome during the Limb Regeneration of Cynops orientalis (文献分享一组-翁海玉)
- Django框架简介,wsgiref 与 jinja2 模块
- iOS 8 录音重放出现 OSStatus error 1685348671 / 2003334207 问题的解决办法