In the console console.log play css style of text and images
Google Developer Center above on Google browser console console.log () of documents
Format | Specifier |
---|---|
%s | Formats the value as a string. |
%d or %i | Formats the value as an integer. |
%f | Formats the value as a floating point value. |
%O | Formats the value as an expandable DOM element (as in the Elements panel). |
%O | Formats the value as an expandable JavaScript object. |
%c | Formats the output string according to CSS styles you provide. |
It can be seen by the placeholder %c
, CSS may be controlled to output text to the console port.
Format is as follows:
console.log("%c需要输出的信息 ", "css 代码");
Output 3D TEXT
|
|
Colored background character
|
|
Text color
|
|
Set different css
|
|
In the Chrome console output picture
|
|
Reference material
https://www.cnblogs.com/Wayou/p/chrome_dev_tool_style_console.html