+
95
-

如何自定义console.log的样式与大小?

请问如何自定义console.log的样式与大小?

网友回复

+
15
-

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>BFW NEW PAGE</title>

    <script type="text/javascript">
        console.log("%cThis is a green text", "color:green");
        console.log("%cThis is a green text", "color:green");

        console.log("%cThis is a blue text", "color:blue");

        console.log("%cThis is a yellow text", "color:yellow");

        console.log("%cThis is a red text", "color:red");

        console.log("%cThis is a default font style", "...

点击查看剩余70%

我知道答案,我要回答